Insufficient capital when using SetShareSize in rotational Strategy
Author: daivd_leake
Creation Date: 11/14/2016 11:28 AM
profile picture

daivd_leake

#1
Eugene hello,

For context, I have read various forum posts on "insufficient capital" and the 100% equity sizing post. But I still cant get a basic strategy to run using SetShareSize()

I'm wondering whether this is possible?

I have a contract size in a column in my DataSets
CODE:
Please log in to see this code.


I have set
Starting Capital 10000000000
Margin Factor 10 to 1

I am also using complete accurate tick sizes and decimal places - but I have divided all the point values by 100 in a final attempt to get this to run!

There is no logical reason that I have insufficient capital to simulate with!

Please can you advise?

David

profile picture

Eugene

#2
Hi David,

There is a reason and I think it's summed up quite well on the top of this Wiki FAQ: I'm using 100% Equity position sizing and strategy doesn't seem to use all capital and/or there are trades not included due to insufficient capital. Could you please review it and try out the workaround mentioned there?
profile picture

Cone

#3
For SetShareSize() you must select Position Size: WealthScript Override (SetShareSize)

If it doesn't work with that, make sure that your Position_Size DataSeries actually has data (just plot it).
profile picture

daivd_leake

#4
Hi - thanks but I've tried these suggestions

See attached for two data sets with position sizes, and scripts to plot the data and an example strategy to recreate the error

Thanks
David




It seems I cant attach any files as they are non-standard

Have you got an email address and I can send it over?

profile picture

Eugene

#5
We do not communicate by email for support matters (Dropbox, Facebook or anything external) but attachments sized below 3MB are welcome. You will see the support file extensions list above "Add Attachments". Just zip (or Rar) the files first if there's something non-standard.
profile picture

daivd_leake

#6
ok trying to attach this .zip file
profile picture

daivd_leake

#7
heres an example script where the error occurs
profile picture

Eugene

#8
Thanks for providing the example. With its own peculiarities, let's not troubleshoot your rotation strategy code. Instead we're going to focus on what you may suppose to be a deficiency or limitation in Wealth-Lab. So I've created a demo script to always trigger a trade whenever there's a change to your position sizing i.e. to your named series Position_Size. I've set up my starting capital to 10000000000 as you suggest (leaving margin factor at 1:1 though), ran this script below in Multi-Symbol mode with "WealthScript Override" activated...

CODE:
Please log in to see this code.


...and could not duplicate the error. There are 251 trades on 2 futures symbols:



As can be seen, Wealth-Lab works correctly.
profile picture

daivd_leake

#9
Thanks Eugene

The error I'm seeing relates to the symbol rotation code in particular rather than the use of external position sizes in general

QUOTE:
With its own peculiarities, let's not troubleshoot your rotation strategy code.


For clarity this is not my code

It's your 'Tactical Asset Rotation' script created back in 2013 (perhaps there is a more recent version?)

I will investigate and follow-up with a separate forum post to try and get to the bottom of this
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).