-
Notifications
You must be signed in to change notification settings - Fork 226
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Questions on accounting model (e.g., for short positions) #131
Comments
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: ***@***.***>
|
I suppose I'd misinterpretted the cash to be free cash. |
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 |
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: