As SplitPosition creates fractional which rounded by Fidelity backend some of shares not exited
which can be seen below example code,
CODE:
Please log in to see this code.
In the above code sample, if we sell the Position which has 11 shares it sells only 5 shares out of 5.5 during "s1" and other 5 shares out of 5.5 during remaining "p"
So, we are left with 1 share not-sold.
Do we have any way to make sure 100% of position-shares(11 shares) can be sold with SplitPositions strategy
Size:
Color:
5.5 shares? Somebody may be missing something here. Wealth-Lab never supported fractional shares.
Size:
Color:
Sure, just simplified my complete code to highlight just this issue and I maybe missing something and need your help. Thanks!
Please find below,
Scale: Daily
Data Range: 1 months
Position Size: Override in script
Symbol: DAL
CODE:
Please log in to see this code.
when I run the above code/strategy, the WL orders tool shows 5.5 shares each split and which becomes rounded to 5 of both at Fidelity and this is how 1 share left unsold..
Please find attached the Orders tool after the above runs which shows this 5.5 shares,
Size:
Color:
A couple of suggestions:
1. Wealth-Lab's Preferences >
Trading > "Exit orders should always exit the full position currently held..."
2. Something like this to close out all remaining shares:
Exit Only Strategy.
Size:
Color:
It is as per Default option which is "disabled" and when I try enabled the check-box and re-run the strategy it Sell complete 11 shares couple of times and as such 2nd time it not even exist as first time all 100% sold.. So looks this doesn't help and better be "default disabled" which atleast split the positions..
Sure, let me check details of your other thread given...
Size:
Color:
You're right, #1 doesn't look applicable.
Size:
Color:
Thanks @Eugene for confirmation.
Also checked your other given thread/discussion but it is not related to "SplitPosition" and so not help my case..
Btw, whether SplitPosition code is WL proprietary (or) opensource and can we see its code to try implement my own version of it by rounding the shares# count when Split-handling.
In worst case of no other options, I plan to implement my strategy just limiting always as Single split Exits being 50%-50% with ensuring I will never Buy Odd-number of shares and Buy only Even-number of shares which together make sure complete exit of the position as 50%-50%
Size:
Color:
QUOTE:
In worst case of no other options, I plan to implement my strategy just limiting always as Single split Exits being 50%-50% with ensuring I will never Buy Odd-number of shares and Buy only Even-number of shares which together make sure complete exit of the position as 50%-50%
That sounds like preferable option. Glad you figured it out on your own.
Size:
Color:
Sure & Thanks!
Size:
Color: