We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
follow https://panifie.github.io/PingPong.jl/stats/#Performance-Metrics
Stats.sharpe(strategy_instance, tf"1d", rfr=0.01) Stats.sortino(strategy_instance, tf"1d", rfr=0.01) Stats.calmar(strategy_instance, tf"1d") Stats.expectancy(strategy_instance, tf"1d")
output
julia> balloons(s) # works great julia> Stats.sharpe(s, tf"1d", rfr=0.01) #<----error ERROR: MethodError: no method matching sharpe(::Strategies.SimStrategy{:SimpleStrategy, ExchangeID{:binance}, NoMargin, :USDT}, ::TimeFrames.Day; rfr::Float64) Closest candidates are: sharpe(::Strategies.Strategy, ::Any, ::Any) got unsupported keyword argument "rfr" @ Stats /opt/opensource/jl/PingPong.jl/Stats/src/metrics.jl:77 sharpe(::Strategies.Strategy, ::Any) got unsupported keyword argument "rfr" @ Stats /opt/opensource/jl/PingPong.jl/Stats/src/metrics.jl:77 sharpe(::Strategies.Strategy) got unsupported keyword argument "rfr" @ Stats /opt/opensource/jl/PingPong.jl/Stats/src/metrics.jl:77 julia> Stats.sortino(s, tf"1d", rfr=0.01) #<----error ERROR: MethodError: no method matching sortino(::Strategies.SimStrategy{:SimpleStrategy, ExchangeID{:binance}, NoMargin, :USDT}, ::TimeFrames.Day; rfr::Float64) Closest candidates are: sortino(::Strategies.Strategy, ::Any, ::Any) got unsupported keyword argument "rfr" @ Stats /opt/opensource/jl/PingPong.jl/Stats/src/metrics.jl:107 sortino(::Strategies.Strategy, ::Any) got unsupported keyword argument "rfr" @ Stats /opt/opensource/jl/PingPong.jl/Stats/src/metrics.jl:107 sortino(::Strategies.Strategy) got unsupported keyword argument "rfr" @ Stats /opt/opensource/jl/PingPong.jl/Stats/src/metrics.jl:107 julia> Stats.calmar(s, tf"1d") # works great -0.3158866997026408 julia> Stats.expectancy(s, tf"1d") #<----error ERROR: UndefVarError: `returns` not defined Stacktrace: [1] expectancy(s::Strategies.SimStrategy{:SimpleStrategy, ExchangeID{:binance}, NoMargin, :USDT}, tf::TimeFrames.Day) @ Stats /opt/opensource/jl/PingPong.jl/Stats/src/metrics.jl:206 [2] top-level scope @ /opt/opensource/jl/PingPong.jl/TimeTicks/src/module.jl:61
The text was updated successfully, but these errors were encountered:
The invocation demonstrated in the documentation, Stats.sharpe(s, tf"1d", rfr=0.01) , does not match the function signature.
Stats.sharpe(s, tf"1d", rfr=0.01)
function sharpe(s::Strategy, tf=tf"1d", rfr=0.0) ... end
Changing it to the function signature will work.
julia> Stats.sharpe(s, tf"1d", 0.01) -11.17254906151372 julia> Stats.sortino(s, tf"1d", 0.01) -12.01871551753598
fix doc or signature
Sorry, something went wrong.
ae6b41c
No branches or pull requests
follow https://panifie.github.io/PingPong.jl/stats/#Performance-Metrics
output
The text was updated successfully, but these errors were encountered: