MCPcopy
hub / github.com/ranaroussi/quantstats / to_returns

Function to_returns

quantstats/utils.py:68–70  ·  view source on GitHub ↗

Calculates the simple arithmetic returns of a price series

(prices, rf=0.0)

Source from the content-addressed store, hash-verified

66
67
68def to_returns(prices, rf=0.0):
69 """Calculates the simple arithmetic returns of a price series"""
70 return _prepare_returns(prices, rf)
71
72
73def to_prices(returns, base=1e5):

Callers

nothing calls this directly

Calls 1

_prepare_returnsFunction · 0.85

Tested by

no test coverage detected