Skip to content

Commit fa44442

Browse files
committed
fix: correct short position return calculation, bump to v0.1.6
Short trades were incorrectly using long formula (exit/entry - 1). Now correctly uses (2 - exit/entry - 1) for short positions based on position_weight sign. - Modified WideTradeRecord::calculate_return() - Modified TradeRecord::calculate_return() - Added unit tests for long/short return calculations
1 parent 9ee1e08 commit fa44442

6 files changed

Lines changed: 338 additions & 178 deletions

File tree

.claude-plugin/plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "polars-backtest",
3-
"version": "0.1.5",
3+
"version": "0.1.6",
44
"description": "Polars backtest extension development helper - backtesting with polars expressions",
55
"author": {
66
"name": "Yvictor",

0 commit comments

Comments
 (0)