Skip to content

Commit 87ec075

Browse files
author
Shlomi Kushchi
authored
Merge pull request #257 from alpacahq/long-short-rerank-logic-fix
Fix logic in rerank()
2 parents 10e17ae + c0b24de commit 87ec075

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/long-short.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ def rerank(self):
250250
equity = int(float(self.alpaca.get_account().equity))
251251

252252
self.shortAmount = equity * 0.30
253-
self.longAmount = equity + self.shortAmount
253+
self.longAmount = equity - self.shortAmount
254254

255255
respGetTPLong = []
256256
tGetTPLong = threading.Thread(target=self.getTotalPrice, args=[self.long, respGetTPLong])

0 commit comments

Comments
 (0)