Skip to content

Retain live statistics chart samples#9484

Open
aiSynergy37 wants to merge 1 commit into
QuantConnect:masterfrom
aiSynergy37:bug-9477-live-stat-retention
Open

Retain live statistics chart samples#9484
aiSynergy37 wants to merge 1 commit into
QuantConnect:masterfrom
aiSynergy37:bug-9477-live-stat-retention

Conversation

@aiSynergy37
Copy link
Copy Markdown
Contributor

Description

Retains the live daily chart samples used by statistics generation before chart data is trimmed for streaming updates. The retained samples are merged into the chart clones used for live statistics so metrics such as PSR continue to have the full daily history.

Related Issue

Fixes #9477

Motivation and Context

Live chart cleanup keeps recent streamed chart data, but daily statistics only add a few samples over that same window. After trimming, statistics generation can see too few daily points and emit default zero values for risk metrics.

Requires Documentation Change

No.

How Has This Been Tested?

  • dotnet build Tests\QuantConnect.Tests.csproj --no-restore -v minimal /p:RunAnalyzers=false
  • Added a focused live result handler test for restoring retained statistics samples into trimmed chart collections.
  • Focused local dotnet test run compiled the test assembly, then the Windows test host aborted during Python.NET GIL finalization before NUnit reported the result.

Types of Changes

  • Bug fix
  • Test coverage

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PSR (and other risk metrics) stay at 0% in live mode due to chart trimming

2 participants