Publications by DomPazz

Portfolio Optimization in R, Part 2

19.12.2011

In the previous post, we built the efficient frontier of a portfolio of bonds. The next logical step is to find the super efficient (or market) portfolio holdings.  If you are unfamiliar with the concept, take a second and read the section section on Wikipedia. If you decided not to read, I’ll paraphrase.  If you have a rate of re...

2462 sym 2 img

Portfolio Optimization in R, Part 3

21.12.2011

In the last post, we discussed the issue of finding the market portfolio by fitting a curve to the found efficient frontier.  Because of kinks in the frontier, we could not guarantee that the fitted curve would be concave in the area of the market portfolio.  A different method was needed.The method I am using, in this post, is to d...

6371 sym 2 img

Portfolio Optimization in R, a previous error.

25.12.2011

I realized that I made a mistake in the calculation of the market weight portfolio from the previous post.  I hold constant the portfolio weights through time. These should be adjusted after each day as prices change.  The market portfolio requires no re-balancing.  What I have is, in essence, a re-balancing back to the original...

1312 sym 2 img

Portfolio Optimization in R, Part 4 Redeux

02.01.2012

So where did we mess up? In the calculation of returns for the market cap weighted portfolio andthe portfolio optimization portfolio, we simply took the starting weights (W0)and multiplied them by the relevant series of returns.resEqual = as.matrix(returns) %*% t(ret)andsubRes = as.matrix(subRes) %*% t(ret)To correct this, we have 2 options....

3746 sym 14 img 1 tbl

Welcome Back, Me

14.01.2012

It’s been a few weeks since I last posted.  Sorry about that.  Unfortunately, sometimes you come home from work just not wanting to look at a computer.I’m working on a series of posts requested by a few friends.  They would like to see me build a time series simulation framework.  I’ve done this in the past with SAS for clie...

1330 sym

Backtesting a Trading Strategy

16.01.2012

I’ve ordered Time Series Analysis and Its Applications: With R Examples (Springer Texts in Statistics) to help me up the time series in R learning curve. So far what I have seen it looks good. The author has a good page with the issues in R and time series.  The book should arrive by the end of the week.In the meantime, I came ac...

5723 sym 4 img 2 tbl

Data Exploration – Gold vs Gold Mining Stocks

12.02.2012

I have been looking into time series analysis with R.  I’m still ramping up the learning curve as I am very accustomed to SAS/ETS.  With ETS, everything is in a couple of procedures, I know where and how to get things done.  In R, things are spread out.  That seems to be a the product of an open system.  That said, I’m gettin...

4969 sym 10 img

Capturing Tick Data via C#, Interactive Brokers, and MySQL

03.03.2012

Interactive Brokers is a discount brokerage that provides a good API for programatically accessing their platform.  The purpose of this post is to create an application that will capture tick level data and save that data into a database for future use.I started to use the IBrokers package in R to do this post.  However, as R is NOT...

14905 sym 4 img

Frustration

06.03.2012

Google has failed me.  Cannot get RMySQL to install on my laptop.  Looks like I am going to need a different method to get data from MySQL into R.If anyone has pointers, I’m all ears.Windows 7 x64, R 2.13.1 Related To leave a comment for the author, please follow the link and comment on their blog: Adventures in Statistical Co...

638 sym

Calling R from SAS IML Studio

01.06.2012

I am playing around with SAS IML Studio 3.4.  For those that do not know, IML (Interactive Matrix Language) is the Matlab-esk language from SAS.  It opperates from normal SAS code through the PROC IML procedure.  A new (to me at least) UI has been developed for analysts called IML Studio.  IML Studio uses a superset of the IML lan...

4474 sym 2 img