when implementing the relative / index chart, I was wondering whether this can be further automated for the TAA / sector rotation among us. Sadly my little VBA skills have come to an end here, but with some help from the community I'm willing to put some brain / time into this.
1) Is it possible to replace the custom reference date by the current startdate of the chart? this would set the base always on the left of the selected timeframe and allow to see % over selected period. was trying to get this running in script, but novice..
2) Is it possible to replace the manual symbol input by pulling them from a watchlist?
3) Maybe we can further elaborate to add panes with momentum, volatilities, correlation of assets in reference watchlist.
4) Maybe pulling equity line from backtest and creating screen for low correlation symbols to be added?
Working on getting my new stategy together with input from 2012 papers AAA (Butler) and FAA (Keller). If there is interest to connect brains, let me know..
If you want to use the chart start date then type a very old date. Example:
a = CompareAssets("GOOG;A;AA;AAPL", "05/20/1800");
You can update the custom indicator by selecting "Tools" then "Create Functions".
We will write another blog post that answers the other questions.
Regarding the last question, it is possible to get equity line from a backtest by right clicking on the equity chart of the backtest report then selecting "Equity to Symbol".
This will create a new symbol.
to follow up on an integrated chart for TAA - rotation strategies, I was curious whether I get this done in C#, here a first draft which hopefully can get improved by the pros:
Pull symbols from any watchlist and adapt chart so that base 1 matches left visible start date:
Screenshot and scripts in attached link: https://drive.google.com/folderview?id=0B2nAWp8wo_B6eXpPcVYxVXRSOXc&usp=sharing and also in trading items:
Script to be put as shortcut as "one-click" tune to trigger update of chart and watchlist:
Use this or similar formula in your 1st chart pane for performance chart:
---------------------------------------
temp1 = CompareAssets(); // updated version uploaded or in link
temp2 = iffstr(temp1,"Close - All plotted","Close - Only first 27 plotted");
PrintChart(temp2, "Notice", BottomLeft, colorWhite, colorBlack, colorBlack, 255);
---------------------------------------
On the second and third pane you can use this one for Roc, Ema, Stdev, etc:
---------------------------------------
temp1 = CompareAssetsFunc("Rocr100",100); // new version including more features and custom indicator uploaded or in link
temp2 = iffstr(temp1,"Rocr100 - All plotted","Rocr100 - Only first 27 plotted");
PrintChart(temp2, "Notice", BottomLeft, colorWhite, colorBlack, colorBlack, 255);
---------------------------------------
Hope somebody joins in to further finetune and add further features.
Keller, Wouter J. and van Putten, Hugo S., Generalized Momentum and Flexible Asset Allocation (FAA): An Heuristic Approach (December 24, 2012). Available at SSRN: http://ssrn.com/abstract=2193735 or http://dx.doi.org/10.2139/ssrn.2193735
and just released:
Keller, Wouter J. and van Putten, Hugo S., Tactical MPT and Momentum: The Modern Asset Allocation (MAA) (December 30, 2013). Available at SSRN: http://ssrn.com/abstract=2373086 or http://dx.doi.org/10.2139/ssrn.2373086
Let me know if there is interest to implement concept behind.
Let me add one more related item after an exchange on tactical asset allocation with Clonex, who gladly has added risk parity concepts as AMM scripts in the sharing server.
There are two nice heuristic solutions out there for Minimum Variance and Minimum Correlation optimization, e.g. simple calculations w/o need for any fancy quadratic optimizer. Weighting % discrepancy from solver optimization is minimum (and I expect covered by error from noise anyhow). Side benefit is that its lightning fast (20ms) vs. solver solution.
In my experience, MinVar indeed drastically reduces portfolio volatility (~7% in my previous setup vs standard 15% w/o) and therefore DD (<10% vs. 20%), but it comes at the price of lower return and sitting most time in lowvol bonds/treasuries if included in symbol selection. To overcome this, an alternative approach is using pure equity ETF in optimization, and using additional market signal to get out of trouble in high-vol times.
I%u2019ve brought the MinVar into VB, with good results, but not good enough to convert to C# script. Maybe QS or somebody in the community is interested in getting both into C# for the benefit of all users? :-)
Anybody freaking out to do some voluntary coding? I will, but have a hard time getting acquainted with picky C#, miss my "universal variants" from VBA :-)
Have fun!
Alex
P.D. Thanks and all the flowers to the guys from CSSA and systematic investor for the brain part.
Trading financial instruments, including foreign exchange on margin, carries a high level of risk and is not suitable for all investors. The high degree of leverage can work against you as well as for you. Before deciding to invest in financial instruments or foreign exchange you should carefully consider your investment objectives, level of experience, and risk appetite. The possibility exists that you could sustain a loss of some or all of your initial investment and therefore you should not invest money that you cannot afford to lose. You should be aware of all the risks associated with trading and seek advice from an independent financial advisor if you have any doubts.