Sell shares are different after changing position size from Raw Profit to Portfolio Simulation
Author: MustPlayOptions
Creation Date: 2/21/2020 3:04 AM
profile picture

MustPlayOptions

#1
So when I'm running my strategy I don't run it for all data but for 1 year.

When I made my changes yesterday, I tried changing from a fixed amount of each trade to a percent equity for the trade (2.5%).

I ran into a very annoying issue today. All of the sell signals had the wrong number of shares. I believe it's because the last year first date changed so my net equity changed. I'm not positive though because even when I run it for 1 year from 2/21/19 to 2/19/20 the share number doesn't match what it did yesterday so not sure what's happening exactly.

I tried to see if one of the custom measures had a way to use fixed equity starting with a specific date but didn't find one.

Given that 60 trades can happen in a day it's not feasible to change the shares every time.

Any suggestions if I want a percent equity trade? Or should I just fix the value like I had before and change it manually over time (which is annoying but less annoying than changing the number of shares on 60 trades)?

Thanks

profile picture

Eugene

#2
You never mentioned Strategy Monitor here but if you're using it, you have read this note in the User Guide, didn't you?

Strategy Monitor > Operational difference between the Strategy Monitor and Backtester

It just gives a clear perspective on what will happen if a position size other than a Raw Profit is applied to a system running in the SM. But even in the case you're using just Strategy window, not sure why what you describe should be an issue. If you change the position sizing option in the middle of the road, there's no doubt that the share size will change. It's pretty much expected.

I've renamed the thread to describe your question more clearly --

WAS: Percent Equity Trade Issue
IS: Sell shares are different after changing position size from Raw Profit to Portfolio Simulation
profile picture

Cone

#3
QUOTE:
All of the sell signals had the wrong number of shares. I
You're trading with Fidelity, right? Make sure to check the option: Preferences > Trading > Exit Orders (Sell and Cover) should always exit the full Position currently held on a per trade basis. In this way, it won't matter what the Position size of the exit alert is - the correct size should be applied to synchronize with your account.
profile picture

MustPlayOptions

#4
I'm using the quotes window. I have no experience with strategy monitor and I changed the position sizing to percent 2 days ago so it bought stuff yesterday. Last night when I went to go out the sell orders in all the shares were different.

It doesn't matter if it's quotes or sim thoughts because when you run the strategy it is different sizes from 1 day to the nextnif any trades have taken place.

What will happen if I have multiple positions in the same stock if I press that for Fidelity? That could be a big problem if it sells all my shares. What happens if some of the sizes are bigger than the trigger?

I don't think I agree with the title change. I changed from fixed size to percent size on the sizing window. I'm not sure others will understand what you mean by raw profit va simulation when it's the same window for sizing. I know I didn't when I read it. But whatever, the issue is still there.

Thanks
profile picture

Eugene

#5
QUOTE:
I don't run it for all data but for 1 year.

Of course changing the starting date (what your post #1 said) may change the equity and consequently the entry/exit sizes. Your trades are no longer the same. There is no issue here.

If using indicators with long periods this may be of interest: GetAllDataForSymbol
profile picture

MustPlayOptions

#6
Using all the data for symbols can't work for this unfortunately.

To me it actually is an issue because then how exactly does one trade with a percent equity using WL? The only way I can think of is to use all data but then with >350 stocks that takes forever. It literally took 15 minutes for it to generate the alerts because of the performance calculations.

IMO opinion there should be a way to either 1:

1) Assign a fixed equity on a certain date and have it hard set the backtesting to that number (not easy).

2) Assign a fixed start date and end date be the current day - i.e. not a fixed look back period, or a fixed look back time frame e.g. 1 year. This would be a very easy fix and would solve any portfolio sizing problems.

Since those don't exist, how do others who are using a percentage position size do their trading and loading of alerts?

Thanks
profile picture

Eugene

#7
QUOTE:
2) Assign a fixed start date and end date be the current day - i.e. not a fixed look back period, or a fixed look back time frame e.g. 1 year.
My feeling is that it's the change of start date ("1 year" as you said) triggered the change in the backtested trades and hence the equity values. If you fix the starting date to 1/1/2019 that would do the trick otherwise ("1 year") it's a rolling window.
profile picture

MustPlayOptions

#8
Ok, I think figured it out, your last post kind of helped thank you. I have to try it tonight when I have time.

But I set the backtest date to 1/1/19 and then end date to 12/31/30. I.e. the end date is way far in the future so I don't need to change it daily. It ran but I need to check the alerts closer tonight.

Thanks!
profile picture

Eugene

#9
You're welcome.
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).