# Mathematical Expectation for a trading system

16 messages
Open this post in threaded view
|

## Mathematical Expectation for a trading system

 Hello, In "The mathematics of money management" by Ralph Vince there is a formula for calculating the Mathematical Expectation of a game (in R pseudo code): ME  =  for(i in 1:N) { Pi * Ai} where P = Probability of winning or losing A = Amount won or lost N = Number of possible outcomes. Or in text: "Mathematical expectation is the amount you expect to make or lose, on average, each bet". Now suppose I want to know the Mathematical expectation of a trading system. I have a series of trade returns: > trades\$PnL  [1]  -5.75  10.00  -1.25  96.00 -16.00 -35.00  29.00 -18.25  -2.25 -10.25 -21.75  -5.50   8.50 -20.50  -6.00  14.25  18.00 [18]   3.75  -4.25  24.00  17.75  -9.50  11.25 -33.75   6.25 -28.00   1.00  36.75  14.00 -30.75  -0.50   6.75  19.25   5.25 [35] -10.00 -23.25   9.25  11.00 -33.00 -19.00 -17.50  -5.50  -5.75  -8.50 -24.50 -24.00   2.25  -1.00   0.75  -1.75  -2.25 [52]   9.25  15.00  -2.25  -6.75   5.25  -4.75 -10.00  -2.00  63.50 -18.00 -18.00  58.00  -8.75   1.00 -36.75 -23.50 -64.00 [69] -15.75 -10.00 -34.75  27.75 -57.00 204.75 -45.00 -71.00 133.75 So I have A = trades\$PnL and N=77, but how do I calculate P? -Mark-         [[alternative HTML version deleted]] _______________________________________________ [hidden email] mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-finance-- Subscriber-posting only. -- If you want to post, subscribe first.
Open this post in threaded view
|

## Re: Mathematical Expectation for a trading system

Open this post in threaded view
|

## Re: Mathematical Expectation for a trading system

Open this post in threaded view
|

## Re: Mathematical Expectation for a trading system

Open this post in threaded view
|

## Re: Mathematical Expectation for a trading system

Open this post in threaded view
|

## Re: Mathematical Expectation for a trading system

 Mark Knecht wrote: > Hi Mark, > > On Thu, Oct 15, 2009 at 1:28 AM, Mark Breman <[hidden email]> wrote: [...] > >> Ralph Vince warns the reader that the trade system to start with should have >> a positive Mathematical expectation to start with, because the optimal f can >> not turn a losing system into a winning system. > > Independent of the calculations did your system make money > historically? If it did then it has a positive expectation. > The truth of that assertion depends on at least two assumptions: * Selection bias is not very strong. * The market will behave in the future like it did over the historical period. Patrick Burns [hidden email] +44 (0)20 8525 0696 http://www.burns-stat.com(home of "The R Inferno" and "A Guide for the Unwilling S User") _______________________________________________ [hidden email] mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-finance-- Subscriber-posting only. -- If you want to post, subscribe first.
Open this post in threaded view
|

## Re: Mathematical Expectation for a trading system

Open this post in threaded view
|

## Re: Mathematical Expectation for a trading system

 On Fri, Oct 16, 2009 at 2:46 AM, Mark Breman <[hidden email]> wrote: > I think I found the answer for calculating the Mathematical Expectation (as > intended by Ralph Vince): > P = #winners / # losers Is it #winner/#losers or is it #winner/#trades ? Either can be true but I think the latter is more common in my experience as it yields a value between 0 and 1. good luck, Mark _______________________________________________ [hidden email] mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-finance-- Subscriber-posting only. -- If you want to post, subscribe first. markknecht@gmail.com
Open this post in threaded view
|

## Re: Mathematical Expectation for a trading system

 Hi Mark, You are right: it is P = #winners / #trades Thank you, -Mark- 2009/10/16 Mark Knecht <[hidden email]> > On Fri, Oct 16, 2009 at 2:46 AM, Mark Breman <[hidden email]> > wrote: > > I think I found the answer for calculating the Mathematical Expectation > (as > > intended by Ralph Vince): > > P = #winners / # losers > > Is it #winner/#losers or is it #winner/#trades ? > > Either can be true but I think the latter is more common in my > experience as it yields a value between 0 and 1. > > good luck, > Mark >         [[alternative HTML version deleted]] _______________________________________________ [hidden email] mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-finance-- Subscriber-posting only. -- If you want to post, subscribe first.
Open this post in threaded view
|

## Re: Mathematical Expectation for a trading system

 Hi, out of curiosity, how would you define this statistic with a ramp up and ramp down trade system ? Trades could look like this: Buy 1 @ 100 Buy 1 @ 101 Buy 1 @ 102 Buy 1 @ 103 Sell 2 @ 102 Sell 2 @ 101 Sell 2 @ 99 Sell 1 @ 98 ? Thanks, kind regards, Ulrich On Fri, Oct 16, 2009 at 3:36 PM, Mark Breman <[hidden email]> wrote: > Hi Mark, > You are right: it is P = #winners / #trades > > Thank you, > > -Mark- > > 2009/10/16 Mark Knecht <[hidden email]> > > > On Fri, Oct 16, 2009 at 2:46 AM, Mark Breman <[hidden email]> > > wrote: > > > I think I found the answer for calculating the Mathematical Expectation > > (as > > > intended by Ralph Vince): > > > P = #winners / # losers > > > > Is it #winner/#losers or is it #winner/#trades ? > > > > Either can be true but I think the latter is more common in my > > experience as it yields a value between 0 and 1. > > > > good luck, > > Mark > > > >         [[alternative HTML version deleted]] > > _______________________________________________ > [hidden email] mailing list > https://stat.ethz.ch/mailman/listinfo/r-sig-finance> -- Subscriber-posting only. > -- If you want to post, subscribe first. > -- Ulrich B. Staudinger         [[alternative HTML version deleted]] _______________________________________________ [hidden email] mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-finance-- Subscriber-posting only. -- If you want to post, subscribe first.
Open this post in threaded view
|

## Re: Mathematical Expectation for a trading system

 In reply to this post by Mark Breman-3 Please see the first response I made to this thread. Cheers, Mark On Fri, Oct 16, 2009 at 6:36 AM, Mark Breman <[hidden email]> wrote: > Hi Mark, > You are right: it is P = #winners / #trades > Thank you, > -Mark- > > 2009/10/16 Mark Knecht <[hidden email]> >> >> On Fri, Oct 16, 2009 at 2:46 AM, Mark Breman <[hidden email]> >> wrote: >> > I think I found the answer for calculating the Mathematical Expectation >> > (as >> > intended by Ralph Vince): >> > P = #winners / # losers >> >> Is it #winner/#losers or is it #winner/#trades ? >> >> Either can be true but I think the latter is more common in my >> experience as it yields a value between 0 and 1. >> >> good luck, >> Mark > > _______________________________________________ [hidden email] mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-finance-- Subscriber-posting only. -- If you want to post, subscribe first. markknecht@gmail.com
Open this post in threaded view
|

## Re: Mathematical Expectation for a trading system

Open this post in threaded view
|

## Re: Mathematical Expectation for a trading system

Open this post in threaded view
|