Re: [amibroker] Artificial intelligence

 

Hi Gregg --

This message is a comment on the results shown in your video.  At about 9:00 of the video you show the results of a system trading SPY long / short.  You state that those trades are out-of-sample, obtained after the system was completed and unchanged since then.  What follows is an analysis of the risk and profit potential of that set of trades for a two-year forecast horizon, assuming the future resembles the past.

There are 29 trades in 7.5 months (June 16, 2015 through February 1, 2016).  The trades range from -3.02% to +9.01%.  Nine trades are losers.  The mean gain is 0.67%

A forecast of two years requires 93 trades.  The analysis assumes you will always wait for the exit signal.  If there were any subjective exits, this analysis does not account for them and is overly optimistic.  A Monte Carlo analysis assumes the system is stationary with respect to the set of trades, and that all trades are independent.  A sequence of 93 trades is drawn, with replacement, from the population of 29 trades, final equity calculated, and maximum closed trade drawdown calculated.  Iteratively, position size is adjusted to find the fraction of the account that can be safely used so that the trader's risk tolerance is not exceeded -- call it safe-f.  I used an estimate of personal risk tolerance of a 5% chance of a 20% drawdown.

This set of trades is very tradable.  Safe-f is 1.80.  The implication is that 180% of actual funds can be used to take individual trades.  That is, a trading account with a cash balance of $100,000 can be used to take positions of $180,000.  When you get a signal to buy SPY, compute 90% of the account balance and buy as many shares as can be afforded of SSO (one of the ETFs that tracks the S&P 500 with a 2X beta), or your other favorite.  When you get a signal to short SPY, compute 90% of the account balance and buy as many shares of SDS (one of the ETFs that tracks the S&P 500 with a -2X beta), or your other favorite.

Using the distribution of 1000 Monte Carlo passes, each computing a single equity sequence, drawdown at the 95th percentile (DD95, for those of you who are following along in my Modeling Trading System performance book, where all of this is explained in detail) is 20%.  Terminal wealth at the 25th percentile is 2.32.  Correspondingly, compound annual rate of return at the 25th percentile -- CAR25 -- is 52%.  (1.52 ^ 2 == 2.32)  Interpretation is that there is a 75% chance that CAR will be greater than 52% over the next two years.  The probability of having less equity at the end of two years than at the beginning (that is, that the system lost money over a two year period) is 1 percent. 

These are really good results. The analysis holds whether the trade were truly out-of-sample or not.  If they were out-of-sample, you have a tradable system. 

As all systems wax and wane, I recommend using a moving window of the recent trades to detect changes in system performance and adjusting position size dynamically.  (Details are explained in my Quantitative Technical Analysis book)  Results will be better -- in particular, they will be safer --  than using a single position size fraction for all trades.  

Best regards,
Howard

On Sun, Feb 7, 2016 at 10:16 AM, rosenberggregg@yahoo.com [amibroker] <amibroker@yahoogroups.com> wrote:
 

Hi Ton, I won't say too much because I think it's part of my edge. The gist of it is that ROC() is a two-point measure along one dimension but change is both multi-point and also multi-dimensional. When change is broken down into a series of one-dimensional measurements related by Pearson's or other relational measures, there are information leaks.


__._,_.___

Posted by: Howard B <howardbandy@gmail.com>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (20)
**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/


.

__,_._,___


EmoticonEmoticon