Publications by klr

Clustering with Currencies and Fidelity Funds

26.05.2011

Great news came yesterday with the release of the R In Finance 2011 Presentations.  I must attend next year after seeing all that I missed.  The Iacus: Statistical Analysis of Financial Time Series and Option Pricing in R (pdf) presentation offered a different method of clustering than that shown in yesterday’s post Eigen-who? How Can I Write...

1824 sym R (4660 sym/1 pcs) 14 img 6 tbl

More St. Louis Fred Fun with National Financial Conditions

30.05.2011

I owe someone at the Fed a beer for all the recent additions at http://research.stlouisfed.org/fred2/.  I have covered some in Spreads and Stress and Gifts from BAC ML and the Federal Reserve.  The newest addition 8 Chicago Fed Indexes Added to FRED contains a nice weekly series on US National Financial Conditions that I’m sure we can use. ...

1276 sym R (2728 sym/1 pcs) 10 img 4 tbl

Overoptimizing Chicago Fed

31.05.2011

THIS SHOULD BE OBVIOUS THROUGHOUT THE POST BUT THIS IS NOT INVESTMENT ADVICE.  PLEASE DO NOT FOLLOW THIS SYSTEM AS IT COULD RESULT IN SERIOUS LOSSES. One of the perils of system-building is the tendency to unintentionally overoptimize by playing/refining the parameters to fit history.  It starts with some harmless data playing but very possibly...

1439 sym R (2096 sym/1 pcs) 8 img 3 tbl

Annual Returns by State of the US Economy

01.06.2011

Sometimes it is fun to just look at annual returns, especially as the financial world has shifted its focus to microseconds in a world of inconceivable macro imbalances.  St. Louis Fed (USREC) offers a binary state of the economy with 1=recession and 0=expansion, but we all must remember that the assignment of the beginning and end dates of rece...

1648 sym R (1546 sym/1 pcs) 12 img 5 tbl

A Quantstrat to Build On

02.06.2011

THIS IS NOT INVESTMENT ADVICE.  PLEASE DO NOT TRADE THIS SYSTEM AS IT CAN LOSE SIGNIFICANT AMOUNTS OF MONEY.  YOU ARE RESPONSIBLE FOR YOUR OWN GAINS AND LOSSES. Some R finance powerhouses have been banging away on the quantstrat package for quite a while now with some very impressive results.  For my first quantstrat, I wanted to use some sort...

1369 sym R (2796 sym/1 pcs) 4 img 1 tbl

A Quantstrat to Build on Part 2

07.06.2011

As I explore additional functionality of quantstrat and make changes to my original post A Quantstrat to Build On, I will write multiple posts, and hopefully, the finished product will not be so overwhelming to comprehend.  Also, it might highlight how I build a system, or how like Pixar, I go “from suck to not suck,” highlighted in a great ...

2812 sym R (3753 sym/1 pcs) 6 img 2 tbl

A Quantstrat to Build on Part 3

08.06.2011

This just does the same thing as A Quantstrat to Build on Part 2, but I use sigCrossover and sigComparison instead of sigThreshold as my signal.  Maybe it will help some struggling to understand implementation of the different signal types.  For this system, sigThreshold works best, since sigComparison and sigCrossover require us to hack anothe...

993 sym R (3694 sym/1 pcs) 2 img

A Quantstrat to Build on Part 4

08.06.2011

When we build a system, we are almost always trying to beat buy and hold by some metric or metrics.  I have not found a demo to compare a quantstrat system with a generic buy and hold system.  Here is the way I accomplish a basic comparison with the chart.Reconcile function of the blotter package and a BuyHold function to generate a buy signal ...

828 sym R (4557 sym/1 pcs) 6 img 2 tbl

A Quantstrat to Build on Part 5

09.06.2011

Another iteration of the quantstrat system but this time with a sum of standard deviations instead of simple count and then some comparison charts.  Thanks for the comments and I welcome many more.  In my head and it seems like in others based on comments, we should assign higher importance to extreme days, so extreme days should get a stronger...

1195 sym R (6506 sym/1 pcs) 6 img 2 tbl

REITs for Everybody

10.06.2011

THIS IS NOT INVESTMENT ADVICE.  IT IS SIMPLY MY OPINION.  LISTENING TO MY OPINION MIGHT LOSE LOTS OF MONEY. I contend that REITs now have two buyers: dividend pickers and beta chasers.  The beta chasers’ demand has driven prices to significantly overvalued levels considering relative and absolute yields. As a quick break from my quantstrat f...

1165 sym R (1148 sym/1 pcs) 4 img 1 tbl