Greetings --

MK wrote:

I believe that is called Bootstrapping. In Monte Carlo you have to first
guess the distribution of trades - more assumptions.

---------------

This response is about assumptions about the distribution (not about
bootstrapping).

It is not necessary, or even advisable, or even good practice, to make
assumptions about the distribution of the trades.  It is important that the
trades from which the Monte Carlo Analysis draws its data are representative
of the trades the system under study produces.

There are techniques for determining the theoretical distribution that is
closest to the observed data, but you do not need to use them unless you are
planning a mathematical analysis.  Even then, many of the theoretical
distributions do not lend themselves to closed form solutions.

If you are going to use Monte Carlo Analysis, begin with as many closed
trades as you can generate (always out-of-sample only).  About 100 is a
reasonable minimum number.  There is probably no need to go beyond 1000.
Using a spreadsheet, sort the trades from worst loss to best gain, then form
a Cumulative Distribution (CDF) from the data.  It will look like a smooth
"s" shaped curve going from the lower left to the upper right.  The
horizontal axis has the worst trade as its leftmost value and the best as it
rightmost value.  The vertical axis has 0 as its lowermost value and 1.00 as
its uppermost value.  Look it statistics texts or do an Internet search for
more details.  [The CDF is the integral of the probability density function
(pdf).  The way the "normal" distribution graph is usually displayed is a
pdf.]  Once you have the CDF, you can select a new trade whenever you need
it by using a uniform random number generator.  Generate a random number,
look up the corresponding value of the trade using the CDF.  Essentially you
generate a uniform random number, go up the vertical axis to that value, go
across until you bump into the CDF, go down to the horizontal axis, and read
off the value for that trade.  Repeat as often as necessary.  This gives
sampling with replacement.  You can generate as many trades as you want --
not necessarily the same number you used to build the CDF.

If you prefer sampling without replacement, build a two dimensional array.
Column 1 has the trades.  Column 2 has values generated from a uniform
random number.  Sort the two columns on column 2.  Keep an index into the
table.  Every time you need a new trade, pick the one at the index, then
increment the index.  For a repeated run, use a fresh set of random numbers
in column 2, resort, and start selecting values from the beginning again.

Thanks for listening,
Howard

Reply via email to