Volatility targeting Positionsize
Forums › ProRealTime English forum › General trading discussions › Volatility targeting Positionsize
- This topic has 4 replies, 4 voices, and was last updated 1 day ago by
Snålänningen.
-
-
04/03/2025 at 11:43 PM #245570
Hi, have anyone of you looked into volatility based Positionsizing? I have played around a bit, but with no a huge success yet. Here is my current code, let me know if you have ideas for improvements or other code snippets for this?
Vol Targ PositionSize1234567891011121314151617181920212223//--- ParametersriskPercent = 1 // Risk per tradeatrLength = 14atrMultiplier = 2minContracts = 0.5 //Min amount of contract you wanna take per trademaxContracts = 2 // Max amount of contract you wanna take per trade//--- ATR-based stop lossatr = AverageTrueRange[atrLength]stopLoss = atr * atrMultiplierriskInPoints = close * (riskPercent / 100)//--- Raw positionsizerawSize = riskInPoints / stopLoss//--- NormalizingminRaw = 0.5maxRaw = 10normalized = (rawSize - minRaw) / (maxRaw - minRaw)normalized = max(0, min(1, normalized)) // keep within min max contract//--- Normalized positionsizecontractSize = minContracts + normalized * (maxContracts - minContracts)04/22/2025 at 8:22 PM #246247Hi Snålänningen,
Have you tried using Parkinson vol or Kalman Vol. Also with the new array (I’ve not tried as I’m new to ProRealCode) implementing a self calibrating HAR-RV model? its just a linear equation with inputs to calibrate over x days every x days.
I do this in python and it’s very successful. Yet to try with ProReal. Also look into Vol Timing on a monthly basis. Some good research papers out there. Interested to see how you get on. I’ll be trying the same soon hopefully.
I have python code?
04/23/2025 at 12:04 PM #246284Hi. Yep I’ve tried pretty much exactly that Snalanningen on a 1m day trade system. For me it was to no avail over lengthy periods 6m+. Just changed where and how I had DD then I turfed it because it just added another variable.
Hope you get on better than I did, some traders swear by it.
04/23/2025 at 12:28 PM #246288Hi, have anyone of you looked into volatility based Positionsizing? I have played around a bit, but with no a huge success yet.
hi, what do you mean by “no huge success”? did what you worked out not improve anything at all in the performance? what kind of significant improvement did you expect? and what was the “failure”?
from what I remember when I tested vola-based position sizing was that it made me crazy because you can then have position size from 0 to infifinity (ok, let’s say from 0 to very large). of course one can squeeze the size between some min and max as you do in your code, but then it’s only partly vola-based, and still some issues remain, e.g. with margin management, especially if one has several systems which might carry several positions at the same time, reserving margin from the same account…
what I can imagine (and in one system I implemented) is kind of “yes or no” decision: so you either trade some fixed position size or don’t trade at all. so you trade fixed amount of contract – until vola reaches defined level (might be extremely high vola compared to “normal”, or might be extremely low vola) – and then you stop, until vola comes back to “normal”.
cheers
justisan
04/24/2025 at 11:29 AM #246332Hi, thanks for all your thoughts!
By “no huge success” I mean it didnt reduce my drawdowns and/or provided any better risk-adjusted returns. As you say, it might be cause I cant go “full” volatility targeting, and using only contract sizes between 0.5-2 instead of 0.5-10 for example, so the change isnt that big.
Indeed as you say, maybe the easier way (when you dont have infinite capital) is to have some kind of hard yes/no volatility filter instead, if the volatility is too high – dont trade at all (if it looks promising in backtest of course, I guess some algos might work better with higher volatility).
-
AuthorPosts