mirror of
https://github.com/wassname/catalyst.git
synced 2026-07-15 11:22:18 +08:00
MAINT: Make returns frequency and returns index class members.
Hold on to the values set for the returns frequency and the cont index, mainly for debugging purposes mid-process. It was useful to have these values when debugging why there was an extra non-midnight time in the index.
This commit is contained in:
@@ -86,11 +86,15 @@ class RiskMetricsCumulative(object):
|
||||
if returns_frequency is None:
|
||||
returns_frequency = self.sim_params.emission_rate
|
||||
|
||||
self.returns_frequency = returns_frequency
|
||||
|
||||
if returns_frequency == 'daily':
|
||||
cont_index = self.get_daily_index()
|
||||
elif returns_frequency == 'minute':
|
||||
cont_index = self.get_minute_index(sim_params)
|
||||
|
||||
self.cont_index = cont_index
|
||||
|
||||
self.algorithm_returns_cont = pd.Series(index=cont_index)
|
||||
self.benchmark_returns_cont = pd.Series(index=cont_index)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user