mirror of
https://github.com/wassname/catalyst.git
synced 2026-07-25 13:10:33 +08:00
switched reporting to provide cash, equity, and total portfolio value
This commit is contained in:
@@ -448,6 +448,7 @@ class PerformancePeriod():
|
||||
'starting_value' : self.starting_value,
|
||||
'starting_cash' : self.starting_cash,
|
||||
'ending_cash' : self.ending_cash,
|
||||
'portfolio_value': self.ending_cash + self.ending_value,
|
||||
'positions' : positions,
|
||||
'timestamp' : datetime.datetime.now(),
|
||||
'pnl' : self.pnl,
|
||||
|
||||
+20
-11
@@ -634,22 +634,31 @@ def PERF_FRAME(perf):
|
||||
|
||||
daily_perf = {
|
||||
'date' : EPOCH(date),
|
||||
'date_string' : str(date),
|
||||
'returns' : tp['returns'],
|
||||
'pnl' : tp['pnl'],
|
||||
'portfolio_value' : tp['ending_value']
|
||||
'market_value' : cp['ending_value'],
|
||||
'portfolio_value' : cp['portfolio_value'],
|
||||
'starting_cash' : tp['starting_cash'],
|
||||
'ending_cash' : tp['ending_cash'],
|
||||
'capital_used' : tp['capital_used']
|
||||
}
|
||||
|
||||
cumulative_perf = {
|
||||
'alpha' : risk['alpha'],
|
||||
'beta' : risk['beta'],
|
||||
'sharpe' : risk['sharpe'],
|
||||
'total_returns' : cp['returns'],
|
||||
'volatility' : risk['algo_volatility'],
|
||||
'benchmark_volatility' : risk['benchmark_volatility'],
|
||||
'benchmark_returns' : risk['benchmark_period_return'],
|
||||
'max_drawdown' : risk['max_drawdown'],
|
||||
'pnl' : cp['pnl']
|
||||
'alpha' : risk['alpha'],
|
||||
'beta' : risk['beta'],
|
||||
'sharpe' : risk['sharpe'],
|
||||
'volatility' : risk['algo_volatility'],
|
||||
'benchmark_volatility' : risk['benchmark_volatility'],
|
||||
'benchmark_returns' : risk['benchmark_period_return'],
|
||||
'max_drawdown' : risk['max_drawdown'],
|
||||
'total_returns' : cp['returns'],
|
||||
'pnl' : cp['pnl'],
|
||||
'market_value' : cp['ending_value'],
|
||||
'portfolio_value' : cp['portfolio_value'],
|
||||
'starting_cash' : cp['starting_cash'],
|
||||
'ending_cash' : cp['ending_cash'],
|
||||
'capital_used' : cp['capital_used']
|
||||
|
||||
}
|
||||
|
||||
# nest the cumulative performance data in the daily.
|
||||
|
||||
Reference in New Issue
Block a user