发布

  • 11111 1ca4389ed2

    Adds SharpeRatio indicator (#5348)

    frostbyte_neo 发布于 2021-03-11 21:35:08 +00:00 | 2479 次提交 在此版本后已推送到 master

    • RollingSharpeRatio Submission

    Creation of RollingSharpeRatio indicator, utilizing LEAN engine. Tests were created and successfully passed by the indicator, using spy_rsr.txt as outside data file which was created during a prior running of the program.

    • Fixed Test Case Loading and Added Indicator Function

    Added the RSR() function to auto load the indicator in Algorithm\QCAlgorithm.Indicators.cs. Also added a reference for the test file ("spy_rsr.txt") in Tests\QuantConnect.Tests.csproj.

    • Fixed SharpeRatio Indicator

    Updated the base formula, indicator structure/call, and the testing data for the SharpeRatio indicator.

    • Minor Fixes
    • Removed dividend yield from calculation
    • Fixed typos in code/documentation
    • Minor Style Fix and Error Confirmation
    • Changed style to match style guide better.
    • Checking for confirmation that QuantConnect.Tests.Engine.DataFeeds.LinveTradingDataFeedTests.DelistedEventEmmited_Equity() is server side, as it runs locally and should not have been affected by prior changes
    • Simplification and fixing of SR calculation
    • Updates calculation to proper SR formula
    • Utilizes IndicatorExtensions for SR calculation rather than manual calculation
    • Defines counter for 1 extra period offset on warmup (otherwise first datapoint is inaccurate if warmup period is SharpePeriod length)
    • Minor Fixes
    • Removal of SharpePeriod and RiskFreeRate variables
    • Substitution of (SharpePeriod + 1) for WarmUpPeriod
    • Outdated comment fixes
    • Resubmission for Mono Confirmation Error

    Error detected on Git for this version of the program. An error should not occur as only comments and minor variables were edited. Resubmitting to see if it is a false positive mono error.

    • Notation Fixes

    Fixed notation regarding spacing and outdated comments.

    • Removal of Counter Logic
    • Replaces counter for warmup with improved IsReady logic
    • Fixed Syntax
    • Removed unused imports
    • Fixed variable readability
    • Fixed comments
    • Replaced Tabs with spacing

    Co-authored-by: quantify-cflynn

    下载附件