You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
That's correct, you should double check the accounting model from the paper (chapter 2). Holdings include the cash account, short positions have a matching long in cash.On 1 Feb 2024, at 21:38, random ***@***.***> wrote:
Why is there the check:
v = np.sum(h)
if v < 0.:
raise DataError(
f"Holdings provided to {self.__class__.__name__}.execute "
+ " have negative sum.")
In the case where you are holding primarily short positions, shouldn't the optimizer handle that?
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
Cvxportfolio's (the paper's) accounting model uses the self-financing condition, all asset purchases have a corresponding cash decrease, and sells have a corresponding cash increase. For example, if you start with $1M in your brokerage account, buy $1M in a long positions and sell $1M in a short positions, in our accounting your cash account has still 1 million, the weights vector is (1,-1,1), the portfolio value (sum of h) is one million, leverage is 2. Any fees associated with shorts or margin are to be modeled by HoldingCost, both in optimization and simulation.
Why is there the check:
In the case where you are holding primarily short positions, shouldn't the optimizer handle that?
The text was updated successfully, but these errors were encountered: