Is equity curve passed to PosSizer in MSB mode the combined result or sequential?
Author: sedelstein
Creation Date: 2/28/2012 6:32 PM
profile picture


I am a little confused about position sizers and how they work.

When running a strategy on a dataset that contains, say, two symbols, is the equity curve that gets passed to the position sizer the combined strategy result (one share of each) or does each symbols equity curve get passed sequentially to the position sizer.

The reason I am asking is, suppose you are using a percent winners position sizer and you have 2 symbols say, IBM and APPLE and IBM's winning percentage is 5% and APPLE's winning percentage is 95%. I might want to downsize the IBM trades and upsize the APPLE trades.

Does (Can?) the position sizer do this or does it look at the overall winning percent winners of the combined portfolio?
profile picture


As I already replied to you in this thread: Access to data/stats normally displayed in the performance tab during a backtest

"Note that Wealth-Lab does not provide individual symbol's equities and/or performance metrics to Visualizers/PosSizers, so you'll have to build these curves/metrics yourself in your PosSizer (if that's possible)."

Let's stress this again: Wealth-Lab doesn't pass an array of individual symbol's equities to a PosSizer. It's all explained in the PosSizer API document here: Wealth-Lab Version 6 (.NET) Development Guide

Points of interest:

public DataSeries EquityCurve
Returns a DataSeries object that represents the bar by bar historical equity curve of the backtest.

public abstract double SizePosition(Position currentPos, Bars bars, int bar, double basisPrice, PositionType pt, double riskStopLevel, double equity, double cash);
equity - The current equity level of the simulated account.

The equity here in SizePosition() is the true portfolio equity. When running a single-symbol backtest (e.g. on IBM), Wealth-Lab passes the IBM's equity because it represents the account equity. When running a multi-symbol backtest (e.g. a DataSet comprised of AAPL and IBM), the portfolio equity curve is based on the selected position sizing.

So, the answer is: the PosSizer might be able to do this if you calculate the winning percentage for the individual symbols yourself which should be quite easy. "By default", it looks at the overall percent winners.
profile picture



I appreciate your patience in explaining it to me again. If I wasn't still confused, I wouldn't have asked.

Is there a date when the new Community Components will be released? You mentioned March in a previous thread. Is there any specific target date?
profile picture


Re: C.Components, please check the Extension section of our website and/or the Extension Manager's Update tab in the days to come.
profile picture



Community Components 2012.03 has been released.

I'm duplicating this note here since you've developed a habit of asking same questions in different threads ;)
profile picture


Ouch! I sincerely don't mean to duplicate you efforts. I'm encouraged at least that you added the emoticon.

Okay well here goes

Since you stated
So, the answer is: the PosSizer MIGHT be able to do this if you calculate the winning percentage for the individual symbols yourself which should be quite easy. "By default", it looks at the overall percent winners.

Can you give me a hint.

Suppose there is a dataset containing 2 symbols, say IBM and APPLE
I can keep track of the profit factor (or in the above example, the winning percentage, for each issue)

How might I tell the position sizer that IBM has a profit factor of 3 so it should by $3000 worth and APPL has a profit factor of 5, so it should buy $5000 worth. This is something that a person who doesn't use an algorithm for trading might ordinarily do. Give more individual weight to past winners

Thanks for your help once again.

btw. Thanks for making runDonor a supported solution now.

profile picture


The PosSizer interface provides everything you need to calculate profit factor on a symbol basis. How does one calculate profit factor? Loop by positions, sum the gross profit and loss, divide. In your case, one extra condition in the loop - if the current Bars symbol is e.g. IBM, assign this size, and if it's AAPL, assign that size. Voilà.
profile picture


Thanks Eugene

Off to work!
profile picture


i want to use an other Position Sizer (HT - PosSizer by J!).
I copyed the *.dll in the Directory
C:\Program Files\MS123\Wealth-Lab Developer 6\
but i dont can find the PositionSizer in the Progam.

What can i do?
profile picture


Although we don't support 3rd party addins, here the problem is likely due to the file attributes. The PosSizer that you received/downloaded was automatically marked by Windows as "insecure" for having been obtained from the internet. This is the standard behavior starting from Windows 7. When you drop such DLL file into Wealth-Lab (or many other programs), it doesn't get loaded. You need to close Wealth-Lab and clear the "File downloaded from the internet" flag in File Properties:

What Causes the "File Downloaded from the Internet" Warning and How Can I Easily Remove It?

P.S. Also, if you haven't used PosSizers before - which is less likely considering that you're a seasoned user :) - you may be looking for it in a wrong place i.e. not the Position Size dropdown.
profile picture


Thanks Eugene,

you give me the right Tipp.
Now i'm shure, that i'm not an "seasoned user".
But i learn every day a little more.