PosSizer: function to generate percent of winners?
Author: mikesblack
Creation Date: 3/1/2010 4:07 PM

#### mikesblack

#1
If you can use the example below to help explain the concept would be most appreciated:
min: 3 percent
Max: 12 percent
Max size will be used when winning percent is>= 68

TIA :)

#### Eugene

#2
There's no such function but you can code it yourself.

1) Calculate percentage winners
2) If % winners > 68, return max size
3) Otherwise, return max % size * (% winners / max win %)

#### mikesblack

#3
Using the sizer method "Pct winners position sizing", I understand that the percentage calculation is a rolling % from the start of testing, unlike the report tab "win rate+ profit factor" which is based on a rolling 30 days.

Can you let me know how I might understand how to practically implement this sizing method, assuming my assumption is correct, that the % winners is from the start of testing?

#### Eugene

#4
The "Win Rate + Profit Factor" visualizer is based on rolling 30 positions, not days. It's like a moving average of 30 trades.

Both the built-in and my PosSizers (this one) are using the percentage of winning trades to date. My PosSizer is using closed positions only (not sure about Fidelity's module that uses fixed sums of equity.) Additionally, it sizes positions at the max possible size when there are no closed positions yet. I've just added these facts to the Wiki (thanks for the heads-up).

#### mikesblack

#5
Eugene- I actually totally understood that it was based on trades and not days.

There must be a term that describes the disconnect between thinking and finger strokes when typing. There is one for talking. I think it's called too much beer. :))

So- The calculation from your sizer method is based on percentage of closed trades from the start of testing. So if I started testing with 3 years of data, the rolling ratio of wins to losses might be very different than if I had started testing with 1 year of data. No?

Additionally, if I needed to determine the performance metric to calculate my size per trade, I could use the "Win Rate + Profit Factor" visualizer or use some other report from my own trade records to determine this, but how then might I tie this back to the testing if it's based on an arbitrary start date?

- I know your a very busy guy, so if it seems rational to you, perhaps that sizing method could be revised at some time of your convenience? Perhaps a customizable, rolling number of trades for calculation. To go along with that, perhaps a customizable "Win Rate + Profit Factor" visualizer that allows for varying the number of trades selected for calculation?

An off slightly topic post to come.

#### Eugene

#6
QUOTE:
So if I started testing with 3 years of data, the rolling ratio of wins to losses might be very different than if I had started testing with 1 year of data. No?

Yes, sure. But I see no reason to worry about it. Yes, the number stabilizes with time and should be in line with WL's winning percentage figure from the Performance tab at the end. The good thing about its logic is that it's simple and starts working from the first closed trade, not having to wait for the N closed trades (that might not happen btw).

Adding your option is possible, but with it, another input must absolutely be defined: initial size, because while you're waiting for those N closed trades to happen, it's unreasonable both to trade at the minimum or maximum size possible. I'll mark it for later.

QUOTE:
To go along with that, perhaps a customizable "Win Rate + Profit Factor" visualizer that allows for varying the number of trades selected for calculation?

This is neither something overlooked nor hard to implement. It was considered but since no serious practical reason was found to deviate from a generally accepted baseline of 30 trades, it was left there hardcoded. If there is a good reason, I'd like to know it.

#### mikesblack

#7
I'm experimenting with this with good results, so I'm trying to get a better grasp from the characteristics and statistics. This may be a good sizing option, but I see it perhaps more useful for systems feedback and design. This is true for all the sizer techniques.

Optimization engine for sizer techniques potentially?

#### Eugene

#8
QUOTE:
Optimization engine for sizer techniques potentially?

Thanks for the pleasure of pointing to the Wealth-Lab 5 Wiki FAQ :)

Scroll down to: Is it possible to optimize a PosSizer?

(Yes it is but the FAQ suggests how exactly.)

#9
Great. Thanks!

#### Eugene

#10
Both your requests will be implemented:

1) user-specified number of trades to average in the "Win Rate + Profit Factor" tab - in the upcoming release 2010.04, and
2) user-specified number of trades for averaging the percentage of winning trades in the "Percent Winners position sizing (% Equity)" (no scheduled release date)

#### mikesblack

#11
Looking forward to it Eugene. Thanks!!

#### Eugene

#12
Better late than never. The ability to base the percentage of winning trades over a user-specified number of past trades (i.e. trailing average) was added to MS123.PosSizers:

Percent Winners position sizing (% Equity)

It will appear in the upcoming build (2010.06, shortly).

#### mikesblack

#13
Great Eugene. Thank you very much. I hope that I do not add too much to your workload or ask for too much of your time. I really hope and look forward to having ability to understand the C sharp language that will allow for me to implement these various ideas that I put out there from time to time independently. Point and click via Gui structure comes easy for me and so learning to code accordingly will be of great value, but it will take some time.

Thanks for all of your work and your time supporting your clients various needs. I realize how many hours you put into this project and I am impressed by your dedication and knowledge. I greatly appreciate it.

Cheers!
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).