Fractional shares after SplitPosition not exited due to rounding by Fidelity backend
Author: Sarath1
Creation Date: 7/4/2020 4:49 AM
profile picture

Sarath1

#1
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
profile picture

Eugene

#2
5.5 shares? Somebody may be missing something here. Wealth-Lab never supported fractional shares.
profile picture

Sarath1

#3
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,

profile picture

Eugene

#4
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.
profile picture

Sarath1

#5
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...
profile picture

Eugene

#6
You're right, #1 doesn't look applicable.
profile picture

Sarath1

#7
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%
profile picture

Eugene

#8
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.
profile picture

Sarath1

#9
Sure & Thanks!
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).