Align options realtime PnL with bid-net and show totals in stats.
Header float PnL now uses bid recycle minus premium like position cards. Stats adds realized/open/total net PnL. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -83,3 +83,4 @@ class OptionsStatsLibTests(TestCase):
|
||||
self.assertAlmostEqual(out["avg_loss"], 2.66, places=2)
|
||||
self.assertAlmostEqual(out["profit_loss_ratio"], 0.33, places=2)
|
||||
self.assertEqual(out["open_count"], 1)
|
||||
self.assertAlmostEqual(out["net_realized_pnl"], round(0.87 - 3.99 - 1.33, 4), places=4)
|
||||
|
||||
Reference in New Issue
Block a user