Backtesting platforms

sounds like you'll need some sort of ML algo, that iterates over b-c optimizing through something like gradient descent, or genetics or forests?

I must admit, I had to look up those terms. Of the three, "Genetics" (or a simplified version of it) was how I planned on tackling the problem. I came across this page while researching those terms and it looks pretty cool!

http://blog.equametrics.com/2013/06/genetic-algorithms-and-its-application-in-trading

Random Forest training is a bit over my head at this point...at least based on the research I have done thus far.

thanks!
fan27
 
The following are problems I have already solved with my tool that other tools I have looked at can't do (if you know of a tool that can do these things, please let me know).

1. Conditional statement with multiple time frames:
i.e. DailyClose < LowerBollingerBand and MonthlyClose one month ago is 12-month high

2. Click on a point on a chart and have all of the conditions true for that point load in a separate window. From there I can select the conditions and back test.

Here are some things I would like to do but am yet to see other tools that can do it or allow me to easily to do it with my own code. The following would not be difficult to add to my tool.

3. Build a condition with multiple tickers:
DailyClose-Ticker1 Is Down Big and DailyClose-Ticker2 is Up Big

4. The typical approach for developing strategies goes like this:
a. develop theory (i.e. buying SPY on a pull back while in an uptrend is profitable)
b. manually construct technical conditions that reflects that pattern
c. back test pattern with tool
d. repeat b and c with new conditions until the conditions/exit criteria selected is profitable.

What I would rather do is:
a. develop theory (i.e. buying SPY on a pull back while in an uptrend is profitable)
b. add all conditions to system that could possibly reflect that pattern (i.e. Close > someMovingAvg, 12month high one month ago, close < lower bollinger band, etc).
c. Have the tool iterate over the different combinations of those conditions with different parameters and let me know which combinations yield a positive result.

So essentially the machine is doing the b-c loop for me.

The reason I started researching other tools is because I just don't have much free time to build out my tool. Having a baby will do that for you. My next move is to find someone that can help out with the front end web development who would be interested in being co-owner of the web app.

thanks
fan27

I still don't understand why you think there are walls while in fact all your issues can be achieved for example with AmiBroker etc.

1. Multi timeframe. What is the big deal? No problem.
2. Yes, can be done too
3. Conditions with multiple tickers? Yes, can be done too.
4. That one is doable also. No problem.

In fact all that you've described is rather looking pretty simple.

In this picture it took me 5 minutes to write 50 lines of code trying to solve your issue #4. Most of it is copy&paste and using code snippets
image.png
 
I still don't understand why you think there are walls while in fact all your issues can be achieved for example with AmiBroker etc.

1. Multi timeframe. What is the big deal? No problem.
2. Yes, can be done too
3. Conditions with multiple tickers? Yes, can be done too.
4. That one is doable also. No problem.

In fact all that you've described is rather looking pretty simple.

In this picture it took me 5 minutes to write 50 lines of code trying to solve your issue #4. Most of it is copy&paste and using code snippets
image.png

Thanks for taking the time to post that. Regarding #4, you essentially moved part 2 of the two parts to the machine (which is having the app determine which combination is best rather than having to manually look at the results of each combination yourself). What still has to be done with your technique is manually construct each of the switch statements and variables (MAPeriod, bbperiod,bbwidth, etc).

Ideally how this would work, is you add a condition to the system ( close > moving avg(x), close > close yesterday, etc.). At this point, the manual work is done as the system will take all conditions in the system and do what you did in your script, except there is no more code to write as the code has already been written.

Can you write script code at run time with Amibroker? That could possibly solve the problem.

Whatever the case, Amibroker is certainly an impressive piece of Software which I could see myself using to augment what I write myself.

fan27
 
Thanks for taking the time to post that. Regarding #4, you essentially moved part 2 of the two parts to the machine (which is having the app determine which combination is best rather than having to manually look at the results of each combination yourself). What still has to be done with your technique is manually construct each of the switch statements and variables (MAPeriod, bbperiod,bbwidth, etc).

Ideally how this would work, is you add a condition to the system ( close > moving avg(x), close > close yesterday, etc.). At this point, the manual work is done as the system will take all conditions in the system and do what you did in your script, except there is no more code to write as the code has already been written.

Can you write script code at run time with Amibroker? That could possibly solve the problem.

Whatever the case, Amibroker is certainly an impressive piece of Software which I could see myself using to augment what I write myself.

fan27

It was supposed to be an example. You could certainly do it more generally like this way.
image.png

As for AFL, yes, if you click save then the code is immediately applied in realtime.

Anway if you are used to writing NET there is also a NET SDK available called .NET for AmiBroker. As well as a SDK for C/C++ being available. AB is open architecture.
 
What is the best way to test a portfolio of strategies with Amibroker? I found this post which hints at some techniques:

http://www.inditraders.com/amibroker/8649-amibroker-backtesting.html

thanks
fan27

For example you could do it the way shown below if multi-systems and single security.

You create x number of clones of your symbol that is same number (or more doesn't matter) as the number of your systems. The process takes just milliseconds. Then you move those clones to a watchlist and set that watchlist number in the code. Then you run a portfolio backtest.

image.png
 
Amibroker is interesting. I wonder how easy is to do allocation backtesting based on technical conditions. I have not tried it but it shouldn't be hard. For example:

1. Start long 30% in XYZ1 and 70% in XYZ2
2. If cond1 or cond2 then change the allocation to 40% in XYZ1, 50% in XYZ2 and 10% cash.

Can Amibroker handle cash based on an interest rate series?
 
Amibroker is interesting. I wonder how easy is to do allocation backtesting based on technical conditions. I have not tried it but it shouldn't be hard. For example:

1. Start long 30% in XYZ1 and 70% in XYZ2
2. If cond1 or cond2 then change the allocation to 40% in XYZ1, 50% in XYZ2 and 10% cash.

Can Amibroker handle cash based on an interest rate series?


Yes, you can do your described scenario.
 
Back
Top