PureBytes Links
Trading Reference Links
|
Chuck,
In your example, you specified that you used MCS against 40,000 trades
to determine reliability.
Since I am not familiar with MCS, is it safe to assume that the larger
the number of samples the more reliable the conclusions that are drawn
from MCS analysis... or can smaller samples be applied to MCS
effectively?
I am not a mathematician like DT... so what constraints should be
considered when using MCS analysis re. number of samples.
Phsst
--- In amibroker@xxxxxxxxxxxxxxx, "Chuck Rademacher"
<chuck_rademacher@x> wrote:
> Sorry, Thomas, I must have not been very clear in my explanation.
>
> Here are my steps for parameter selection (right or wrong):
>
> 1. Optimize over the entire universe of stocks that traded between
1992
> and today (13,500 stocks after filtering for minimum price/volume).
This
> process is looking for ONE parameter set across all stocks.
> 2. Check for outliers (huge profits or losses). This is more
important
> for long-term systems that might have bought in 1995 and sold and
the peak
> in 2000.
> 3. Remove the stocks with the largest outlier trades. In the
example I
> gave, trading $10,000, I removed the stocks where single trades
generated
> more than (say) $200,000. AOL, MSFT and a few others generated
more than
> $1 million in profits so I don't want those trades in my parameter
> selection.
> 4. Re-optimize to get "best" parameter set over all remaining
stocks. I
> don't really want to get into defining "best" here.
> 5. I might repeat steps 3 and 4 if I get a new set of large outliers.
> 6. Put the removed stocks back into the watchlist.
> 7. Run Scan to see equity curve with or without compounding.
> 8. When it comes to live trading, my systems are looking at all
stocks.
> Removing stocks from the universe was only done to achieve (IMO) better
> parameter selection.
>
>
> While I'm at it, I may as well tell you the steps I take to decide
if the
> system is even worth doing the steps delineated above. Here is
what I do
> to see if the system has any merit in the first place:
>
> 1. Optimize the system over data between 1994 and 2001
(approximately) to
> find the "best" parameter set.
> 2. Using that parameter set, run the same system over data between
1992 and
> 1993 as well as over the period 2002 and 2003. If the performance
looks
> "almost" as good over those periods (per trade, per annum, drawdown,
etc.),
> then the system (IMO) is worth more effort.
> 3. If the out-of-sample performance is not good (definition?), I
add it to
> my scrap heap of thousands of other rejected systems.
>
>
>
> You then asked about MCS. I use Monte Carlo Simulation to see what
happens
> when I trade a random selection of my buy/short signals. You may
recall an
> equity curve that I posted not too long ago. From memory, that curve
> reflected the results of over 40,000 trades. The initial capital
for each
> trade was $10,000. I wouldn't want to trade less than $10,000,
> particularly when I only like to trade round lots (multiple of 100
shares).
> To take all of the signals generated by that system would require
about $10
> million in capital, based on $10,000 initial capital per trade.
Probably
> beyond the scope of most individual traders.
>
> So... how do I reduce the number of signals so that I can afford to take
> every trade. While we patiently wait for TJ to add some portfolio
> management functionality to AB, I export the trades from AB to TradeSim.
> TradeSim has full MCS capability. Someone in this group posted
references
> to some other software that does MCS.
>
> In any event, I can tell TradeSim that I only have $300,000 (or any
other
> amount) and it will RANDOMLY select signals that it will trade. I
can tell
> TradeSim to do 15,000 random selections and it will show me the average,
> best and worst case equity curves for each of those 15,000 runs.
What you
> are looking for is a fairly consistent performance, regardless of
the list
> of signals accepted by TradeSim. I want to make sure you
understand the
> process here. TradeSim will make a purely random selecction of
buy/short
> signals in each run, investing up to my limit of $300,000 IBM,
MSFT, AOL,
> etc. might be in run number one. Any or all of those stocks might
be in
> run two. You can tell TradeSim whether or not to compound your profits
> (yet another discussion).
>
> The next step, of course, is to rank all signals by something (another
> discussion) and take the signals in some sort of predetermined sequence
> until your system runs out of cash. This functionality is high on
the wish
> list for TradeSim and somewhere on TJ's wish list for AB. Once we
have
> that functionality, we can see if our "smart" method of selecting which
> signals to take has any value over a purely random selection. If
not...
> the method for selection must not be very smart.
>
> I hope that I have answered your questions and concerns.
> -----Original Message-----
> From: tchan95014 [mailto:tchan95014@x...]
> Sent: Friday, April 18, 2003 8:04 PM
> To: amibroker@xxxxxxxxxxxxxxx
> Subject: [amibroker] Re: Compounding, etc. (for Fred)
>
>
> Chuck,
>
> The following is my understanding from reading your posts: you test
> your system on a large universe, when you find a goog parameter set,
> you then run on the same universe to pick up the candidate to trade.
>
> My question:
> 1) Since you do not cut off those losers in historical test from the
> universe (You mentioned that a stock's characteristics can change over
> time), do you still trade a certain stock when you system picks it up
> but you know from you historical test this particular candidate lost
> all the time? (Of course, you also mention you never check what stocks
> are traded by your system, but I just want to know your thought)
>
> 2) You also mention the use of MCS, could you please elaborate on how
> you use MCS to help you on system development or whatever?
>
> Thanks
>
>
> Thomas
>
> --- In amibroker@xxxxxxxxxxxxxxx, "Chuck Rademacher"
> <chuck_rademacher@x> wrote:
> > No rebuke from me. You are 100% correct that one would tend to
> either take
> > on more positions or increase the size of positions using profits.
> Either
> > of these could be called "compounding".
> >
> > I just don't think that compounding has any place in parameter
> selection.
> > I've already given dozens of examples but I'll do one more.
> >
> > Let's say that I had a moving average crossover system (which I
> wouldn't
> > use). Let's also assume that we are investing $10,000 per trade
> initially.
> > I optimize for one set of parameters to use on a basket of stocks.
> One set
> > of parameters generates a trade for AOL that results in a $1.5
> million
> > profit for the $10,000 investment. If I then re-invest that $1.5
> million
> > (in backtesting), I could end up with some huge returns on the next
> trade,
> > based on my original portfolio investment size. This huge profit
> and
> > resultant compounding (in backtesting) could distort the fact that
> those
> > very same parameters generated far less in profits for the other 99
> stocks.
> > In my opinion, I would rather use parameters that missed the AOL
> trade and
> > did better on the other 99 stocks. Keeping AOL in the basket (for
> > backtesting) and compounding the profits from that one trade simply
> doesn't
> > fit in how I select parameters.
> >
> > Once I'm finished selecting my parameters, I will use Scan over all
> 100
> > stocks in basket. I will, at this point, turn on compounding. If
> the
> > parameters I've selected without the benefit of AOL and without the
> benefit
> > of compounding happen to pick up the AOL trade, it's a bonus. I'd
> rather
> > miss the AOL trade (in backtesting) and do well on the rest of the
> stocks in
> > the basket. In my opinion, this approach has a much better chance
> of being
> > profitable in the future. A fantastic-looking equity curve based
> on the
> > benefit of hindsight does little to satisfy my investors.
> > -----Original Message-----
> > From: Fred [mailto:fctonetti@x...]
> > Sent: Friday, April 18, 2003 6:16 PM
> > To: amibroker@xxxxxxxxxxxxxxx
> > Subject: [amibroker] Re: Pairs Trading (a definition for Dingo)
> >
> >
> > Chuck,
> >
> > Your "go" at it is clearly a better description then mine ...
> >
> > I'm still waiting for your rebuke of my description of compounding
> > whether it is in terms of scaling up bet size or increasing the
> > number of securities potentially invested in to be virtually the
> same
> > in terms of how that affects system design, testing and
> optimization
> > in that ones aim is still to yield consistant returns and
> drawdowns
> > on a percentage basis.
> >
> > --- In amibroker@xxxxxxxxxxxxxxx, "Chuck Rademacher"
> > <chuck_rademacher@x> wrote:
> > > MessageI'll have a go at defining pairs trading for you.
> > >
> > > To me, there are two different kinds of pairs trading
> (fundamental
> > and
> > > technical).
> > >
> > > Before I get into that, however, I'll start by telling you that
> > pairs
> > > trading is NOTHING MORE than buying one stock and shorting
> another.
> > > Usually, the dollars invested would be the same for each stock.
> > >
> > > Fundamental pairs trading would be based on YOUR INTERPRETATION
> of
> > the
> > > fundamentals for those two companies. If you spent the time to
> > review the
> > > annual reports for Ford and General Motors, for instance, you
> might
> > decide
> > > that FUNDAMENTALLY Ford should outperform General Motors over
> the
> > next six
> > > months. So, you would buy Ford and short General Motors. Your
> > trade, in
> > > theory, should not be affected by any move in the entire market
> or
> > even the
> > > automotive sector. At the end of the six-month period you
> would
> > liquidate
> > > both positions.
> > >
> > > Technical pairs trading is a little more complex. Again, you
> > would be
> > > buying one stock and shorting another. Most pairs traders
> might
> > only trade
> > > a "pair" that were in the same sector, but that isn't
> necessarily a
> > > requirement. The idea here is that you find two stocks whose
> > average daily
> > > returns move very much in unison. I won't get into the math for
> > determining
> > > this, but I'm sure you get the picture. Let's say that you
> > discover that
> > > the daily returns for Ford and General Motors almost aways move
> > together.
> > > You also observe that if the returns move apart.... they tend to
> > come back
> > > together. You also observe the maximum amount that they
> varied
> > over some
> > > period of time. When you see them move apart by that amount
> > again, you
> > > simply short the one with the higher returns and buy the one
> with
> > the lower
> > > returns. Finally, you just wait for the returns to come back
> > together and
> > > liquidate both positions. Again, the theory is that any
> major
> > move in
> > > the overall market has no effect on your net position.
> > >
> > > I might add that many, if not most, of the professional fund
> > managers using
> > > pairs trading haven't done very well over the last quarter,
> > generating
> > > negative returns for their investors. I've been pairs trading
> > for two
> > > years, netting just over one percent per month for investors in
> that
> > > particular fund. I can also tell you that, in my opinion, any
> > attempt at
> > > fundamental pairs trading is doomed for failure.
> > > -----Original Message-----
> > > From: dingo [mailto:dingo@x...]
> > > Sent: Friday, April 18, 2003 3:13 PM
> > > To: amibroker@xxxxxxxxxxxxxxx
> > > Subject: RE: [amibroker] Re: Dynamic Indicators Poll -- VOTE
> > AGAIN, PLEASE
> > >
> > >
> > > Could you define "pairs trading" please?
> > >
> > > Thx!
> > >
> > > d
> > > -----Original Message-----
> > > From: Fred [mailto:fctonetti@x...]
> > > Sent: Friday, April 18, 2003 3:08 PM
> > > To: amibroker@xxxxxxxxxxxxxxx
> > > Subject: [amibroker] Re: Dynamic Indicators Poll -- VOTE
> AGAIN,
> > PLEASE
> > >
> > >
> > > Yes. I know. See my previous post, but for example I don't
> want
> > to
> > > have to write my own Stdev routine for variable periods
> where it
> > > would require a For loop or a script to get it done. As
> I've
> > said
> > > before, IMHO the best thing about AB today is it's speed and
> > the LAST
> > > thing I want to do is slow it down w/For loops if I don't
> have
> > to.
> > > The best thing about the future of AB is of course the
> support &
> > > potential enhancements and I'll be happy to take the latter
> in
> > > whatever order Tomasz thinks best with my own personal
> > preference at
> > > the moment being the fixing of position size transactions
> being
> > > automatically limited to total available cash followed by
> some
> > other
> > > aspects of portfolio trading i.e. pairs and ranking etc.
> > >
> > > --- In amibroker@xxxxxxxxxxxxxxx, "DIMITRIS TSOKAKIS"
> > <TSOKAKIS@xxxx>
> > > wrote:
> > > > Fred,
> > > > take a look at
> > > >
> > > > per=10+Cum(1)%20;//variable period from 10 to 29
> > > > StochKa=MA(100*(C-LLV(L,per))/(HHV(H,per)-LLV(L,per)),3);
> > > > StochDa=MA(MA(100*(C-LLV(L,per))/(HHV(H,per)-LLV
> > (L,per)),3),3);
> > > > Plot(StochDa,"",1,1);Plot(StochD(),"",4,8);
> > > >
> > > > for example.
> > > > DT
> > > > --- In amibroker@xxxxxxxxxxxxxxx, "Fred" <fctonetti@xxxx>
> > wrote:
> > > > > Tomasz,
> > > > >
> > > > > I agree completely that these are two different areas ..
> .
> > to me
> > > > they
> > > > > are both important with (1) being higher priority then
> > (2) ...
> > > > >
> > > > > With regards to (1) and more specifically those
> functions
> > like
> > > ATR
> > > > > that require multiple arrays ... I understand and in the
> > case of
> > > > ATR
> > > > > I'm not sure I care if this is even dealt with as again
> it's
> > > simple
> > > > > enough like my example w/MACD to create ones own ATR
> with a
> > > Foreign
> > > > > symbol using straight AFL.
> > > > >
> > > > > In the case of a stochastic though it's clearly valid to
> > > calculate
> > > > it
> > > > > as
> > > > >
> > > > > 100 * (C - LLV(C, n)) / (HHV(C, n) - LLV(C, n))
> > > > >
> > > > > as opposed to using highs and lows. However here again
> I'm
> > not
> > > > sure
> > > > > I care as it's easy enough to do these in straight AFL
> with
> > n
> > > being
> > > > > time variant since HHV and LLV are already have the
> > capability of
> > > > > being time variant.
> > > > >
> > > > >
> > > > > --- In amibroker@xxxxxxxxxxxxxxx, "Tomasz Janeczko"
> > > > <amibroker@xxxx>
> > > > > wrote:
> > > > > > Hello,
> > > > > >
> > > > > > As I mentioned in the other post of mine there are
> > > > > > TWO INDEPENDENT areas:
> > > > > >
> > > > > > 1. Make input data array available for functions like
> RSI
> > > > > > 2. Make second argument (period) accept array too
> > (variable
> > > > period).
> > > > > >
> > > > > > Somehow people mix those 2 areas.
> > > > > >
> > > > > > Fred speaks that he wants all functions to cover at
> least
> > > > > > area (1).
> > > > > >
> > > > > > The posts of Mark refer to area (2).
> > > > > >
> > > > > > Let me show you example:
> > > > > >
> > > > > > RSI( period ) - this function has no input data array
> > (uses
> > > CLOSE
> > > > > array
> > > > > > indirectly) and accepts static period
> > > > > >
> > > > > > (1) RSIa( ARRAY, period ) - this function accepts
> input
> > data
> > > > array
> > > > > but accepts
> > > > > > only static period
> > > > > >
> > > > > > (2) RSIa( ARRAY, dynamic_period ) - this function
> accepts
> > > input
> > > > > data array
> > > > > > and accepts both static and dynamic_period.
> > > > > > (NOTE: Current version of AB does NOT support this
> > > RSIa 'flavour'
> > > > > yet)
> > > > > >
> > > > > >
> > > > > > As to (1): implementation of this is relatively easy.
> > > > > > There is one caveat however: many analytical functions
> > > > > > in fact use MORE than one input array. For example
> > Stochastics
> > > use
> > > > > > Close, Open and High arrays as inputs.
> > > > > > ATR too needs OHLC, not only close.
> > > > > >
> > > > > > As to (2): not every function is suitable for this
> kind of
> > > > > operation. Although
> > > > > > theoretically it is possible to rewrite every function
> to
> > > accept
> > > > > such 'variable
> > > > > > periods' the practice shows that transformations that
> are
> > > > recurrent
> > > > > in nature
> > > > > > (exponential averages for example) are
> > extremely 'sensitive' if
> > > > > parameter(s)
> > > > > > change to fast. A kind of "frequency modulation"
> effect
> > appears
> > > > > that may produce
> > > > > > distortions therefore one should be careful working
> with
> > > adaptive
> > > > > systems
> > > > > > using recurrency-based transformations.
> > > > > >
> > > > > > Best regards,
> > > > > > Tomasz Janeczko
> > > > > > amibroker.com
> > > > > > ----- Original Message -----
> > > > > > From: <uenal.mutlu@xxxx>
> > > > > > To: <amibroker@xxxxxxxxxxxxxxx>
> > > > > > Sent: Friday, April 18, 2003 5:28 PM
> > > > > > Subject: Re: [amibroker] Dynamic Indicators Poll --
> VOTE
> > AGAIN,
> > > > > PLEASE
> > > > > >
> > > > > >
> > > > > > > And IMHO also
> > > > > > > LINEARREG, LINREGSLOPE, TSF
> > > > > > > should be removed from your list. Please
> > > > > > > check the remaining too... Test it in AFL editor (it
> > will
> > > > inform
> > > > > you
> > > > > > > via a small hint window about the params after you
> type
> > the
> > > > > opening brace).
> > > > > > > UM
> > > > > > >
> > > > > > > ----- Original Message -----
> > > > > > > From: <uenal.mutlu@xxxx>
> > > > > > > To: <amibroker@xxxxxxxxxxxxxxx>
> > > > > > > Sent: Friday, April 18, 2003 5:21 PM
> > > > > > > Subject: Re: [amibroker] Dynamic Indicators Poll --
> VOTE
> > > AGAIN,
> > > > > PLEASE
> > > > > > >
> > > > > > >
> > > > > > > > Hi mark,
> > > > > > > > can you clarify BBANDBOT and BBANDTOP;
> > > > > > > > IMHO they both already do accept user defined
> > arguments
> > > > > > > > for all the 3 possible parameters to them.
> > > > > > > > UM
> > > > > > > >
> > > > > > > >
> > > > > > > > ----- Original Message -----
> > > > > > > > From: "markf2" <feierstein@xxxx>
> > > > > > > > To: <amibroker@xxxxxxxxxxxxxxx>
> > > > > > > > Sent: Friday, April 18, 2003 4:03 PM
> > > > > > > > Subject: [amibroker] Dynamic Indicators Poll --
> VOTE
> > AGAIN,
> > > > > PLEASE
> > > > > > > >
> > > > > > > >
> > > > > > > > > In Message 38132, Tomasz pointed out that HHV,
> LLV,
> > > > HHVBars,
> > > > > LLVBars,
> > > > > > > > > DEMA, TEMA, MA, WMA, REF, and SUM already work
> with
> > > dynamic
> > > > > > > > > parameters. When I updated the poll to reflect
> > this, ALL
> > > > > votes were
> > > > > > > > > lost so please vote again if you're still
> > interested, LOL.
> > > > > > > > >
> > > > > > > > > http://groups.yahoo.com/group/amibroker/surveys?
> > id=1071266
> > > > > > > > >
> > > > > > > > > I apologize for the confusion. The fact that
> the
> > above
> > > > > indicators and
> > > > > > > > > functions accept dynamic parameters was
> reflected in
> > > > release
> > > > > notes but
> > > > > > > > > not in the 4.30 users guide that I used to make
> the
> > > poll.
> > > > > The fact
> > > > > > > > > that so many of you voted for them shows you
> didn't
> > know
> > > > > either, and
> > > > > > > > > I've asked Tomasz to include this information in
> > the next
> > > > > > > > > documentation update.
> > > > > > > > >
> > > > > > > > > Mark
> > > > > > > > >
> > > > > > > > > "No good deed goes unpunished."
> > > > > > > > > --Steve Karnish
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > Send BUG REPORTS to bugs@xxxx
> > > > > > > Send SUGGESTIONS to suggest@xxxx
> > > > > > > -----------------------------------------
> > > > > > > Post AmiQuote-related messages ONLY to:
> > > > amiquote@xxxxxxxxxxxxxxx
> > > > > > > (Web page:
> > http://groups.yahoo.com/group/amiquote/messages/)
> > > > > > > --------------------------------------------
> > > > > > > Check group FAQ at:
> > > > > http://groups.yahoo.com/group/amibroker/files/groupfaq.
> html
> > > > > > >
> > > > > > > Your use of Yahoo! Groups is subject to
> > > > > http://docs.yahoo.com/info/terms/
> > > > > > >
> > > > > > >
> > > > > > >
> > >
> > >
> > >
> > > Send BUG REPORTS to bugs@xxxx
> > > Send SUGGESTIONS to suggest@xxxx
> > > -----------------------------------------
> > > Post AmiQuote-related messages ONLY to:
> amiquote@xxxxxxxxxxxxxxx
> > > (Web page: http://groups.yahoo.com/group/amiquote/messages/)
> > > --------------------------------------------
> > > Check group FAQ at:
> > > http://groups.yahoo.com/group/amibroker/files/groupfaq.html
> > >
> > > Your use of Yahoo! Groups is subject to the Yahoo! Terms of
> > Service.
> > >
> > >
> > > Yahoo! Groups Sponsor
> > >
> > >
> > >
> > > Send BUG REPORTS to bugs@xxxx
> > > Send SUGGESTIONS to suggest@xxxx
> > > -----------------------------------------
> > > Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxx
> com
> > > (Web page: http://groups.yahoo.com/group/amiquote/messages/)
> > > --------------------------------------------
> > > Check group FAQ at:
> > > http://groups.yahoo.com/group/amibroker/files/groupfaq.html
> > >
> > > Your use of Yahoo! Groups is subject to the Yahoo! Terms of
> > Service.
> >
> >
> > Yahoo! Groups Sponsor
> >
> >
> >
> > Send BUG REPORTS to bugs@xxxx
> > Send SUGGESTIONS to suggest@xxxx
> > -----------------------------------------
> > Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
> > (Web page: http://groups.yahoo.com/group/amiquote/messages/)
> > --------------------------------------------
> > Check group FAQ at:
> > http://groups.yahoo.com/group/amibroker/files/groupfaq.html
> >
> > Your use of Yahoo! Groups is subject to the Yahoo! Terms of
> Service.
>
>
> Yahoo! Groups Sponsor
>
>
>
> Send BUG REPORTS to bugs@xxxx
> Send SUGGESTIONS to suggest@xxxx
> -----------------------------------------
> Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
> (Web page: http://groups.yahoo.com/group/amiquote/messages/)
> --------------------------------------------
> Check group FAQ at:
> http://groups.yahoo.com/group/amibroker/files/groupfaq.html
>
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Get a FREE REFINANCE QUOTE - click here!
http://us.click.yahoo.com/2CXtTB/ca0FAA/i5gGAA/GHeqlB/TM
---------------------------------------------------------------------~->
Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
|