9 Commits

Author SHA1 Message Date
JosueNina 779a7c06c5 Fix PortfolioStatistics WinRate/LossRate documentation (#9431)
* Fix PortfolioStatistics win/loss inconsistency

* Update regression algorithms

* Revert changes

* Fix PortfolioStatistics win rate XML documentation
2026-05-04 10:27:41 -03:00
Jhonathan Abreu ecb8e8da41 Fix trades drawdown calculation (#9249)
* Fix trade drawdown calculation

* Cleanup

* Disable MAE. MFE and Drawdown calculation for FlatToFlat and FlatToReduced trade grouping methods

* Minor test fixes
2026-01-30 15:46:41 -04:00
Jhonathan Abreu bc05aa03f9 Fix win/loss count statistics for options assignments (#7354)
* Add ITM option assignment trade as win in trade statistics

* Add TradeStatistics unit tests

* Add unit tests

* Add OptionTrade class to abstract IsWin method

* Keep track of winning/losing trades

* Add more unit tests

* Change Trade.IsWin to a property calculated by the trade builder

* Improve regression algorithm

* Handle ITM option sell win/loss statistics

* Update regression algorithms statistics

* Revert accidental unwanted changes

* Address peer review

* Keep track of winning and losing transactions for portfolio statistics

* Add more SecurityPortfolioModel unit tests

* Fix failing unit tests

* Minor changes

* Address peer review

* Minor fix
2023-07-10 10:20:29 -03:00
Douglas Stridsberg 921ae391ad Merge branch 'master' into feature-3146-median-trade-durations 2019-04-30 20:34:30 +01:00
Martin Molinero 412eccebc9 Address reviews
- Revert charting rouding
- Add statistics rouding
- Json converter will ignore null order values
- Remove `type` field in `Symbol` json
- Add default type value for the `TimeInForceJsonConverter`
2019-04-30 11:45:07 -03:00
Douglas Stridsberg 05d206ee0d Calculating medians on longs is ~20% faster 2019-04-30 10:10:55 +01:00
Douglas Stridsberg 37cbfd1270 Median trading durations (all/winning/losing) added to TradeStatistics 2019-04-29 17:50:02 +01:00
Stefano Raggi 84555a80ad Fix AlgorithmPerformance property setters for JSON deserialization
AlgorithmPerformance, PortfolioStatistics and TradeStatistics had private setters, so JSON deserialization could not populate their properties.
2017-06-26 17:21:48 +02:00
Stefano Raggi fac6f46a9a New Statistics implementation
Added Trade and TradeBuilder classes
Added UtcTime and OrderFee property to OrderEvent class
Added AlgorithmPerformance class with a few metrics + tests
Added portfolio statistics + rolling statistics

Closes #30 via PR #164

Thanks @SteffanoRaggi!
2015-09-16 20:48:02 -04:00