This is a real world problem. I'm trying to figure out how much to reduce the quantity of a given security in order to maximize the stability of the profit and loss. Essentially I'm trying to hedge out the small, intraday fluctuations and take advantage of the long term tendency of one of the securities to decay.
So we have security D and security N, both of which are being shorted. Since security D has a higher rate of Decay (D for Decay) or loss over time with respect to security N (N for Normal, or Non-decaying), when it is shorted, the negative difference becomes positive, resulting in a profit.
But this doesn't really show up (much) at a daily level. Most intraday fluctuation is random. So over a single day we want security D and security N to be running at as non-variant a profit and loss as possible.
I currently have them running with a tentative ratio of 3.81:
860 SecurityD @ 11.52 = 9907.2
500 SecurityN @ 75.50 = 37750
The reason for the difference is that SecurityD is more volatile.
It is clear that Security D needs to be reduced in order to stabilize P/L. But how much?
Here are some data points I collected during the day
SecurityD, SecurityN, Profit/Loss
11.38, 75.61, 64.15
11.41, 75.6, 47.65
11.33, 75.66, 86.45
11.31, 75.72, 73.65
11.3, 75.73, 70.45
11.23, 75.8, 95.65
11.27, 75.77, 83.05
11.23, 75.79, 100.65
11.34, 75.7, 55.35
11.37, 75.7, 32.05
So basically we want to find some X multiplied on the SecurityD position such that P/L variance in the right column is minimized as much as possible.
The correlation isn't perfect, of course (it's actually about -0.88 according to an analysis I ran on 21 daily data points taken over one month).
I'm not sure how to approach this. I want to use the actual P/L figures in the account as the basis since this is the closest to financial reality as I can get to perform the calculation.
Thanks in advance for any input