nautilus_trader icon indicating copy to clipboard operation
nautilus_trader copied to clipboard

Performance Stats in streaming feather

Open rsmb7z opened this issue 1 year ago • 3 comments

Feature Request

It would be nice to have Performance Stats (engine.portfolio.analyzer.get_performance_stats_returns()) in streaming feather. This will help analyse how the strategy is performing over-time in rolling manner.

Also allowing to specifiy the custom period will be allow more flexibility to request updated stats within Strategy and include performance in decision making i.e. in case the Strategy is under-performing.

rsmb7z avatar Mar 06 '23 13:03 rsmb7z

Hey @rsmb7z yep this is a great idea. Chris and I have spoken about something kind of similar.

We just need to decide where it gets calculated. While we decide, and If you wanted something sooner, I think you could achieve something similar with an actor.

limx0 avatar Mar 06 '23 19:03 limx0

We could probably add some portfolio configuration to calculate and publish performance stats continuously on some interval. It has access to the message bus, will have a think.

cjdsellers avatar Mar 08 '23 07:03 cjdsellers

@cjdsellers thanks for taking this. Yes interval shall be okay once a day (or configurable timedelta). I was having thought on while trading specially Live, we will have single portfolio, so if we can have these stats per strategy.

rsmb7z avatar Mar 08 '23 08:03 rsmb7z