Team Ai
Apppublic

Deepvest/ProfilingAI

sourceHugging Faceupdated 2y agoView on Hugging Face
0likes
backtest_results.cpython-310.pyc12 linesDownload Raw Back to __pycache__
1o

2J��g'�@sJddlmZddlmZddlmZmZmZddlZeGdd�d��Z	dS)�)�	dataclass)�datetime)�List�Dict�OptionalNc@s�eZdZUeed<eed<eed<eed<ejed<ejed<ejed<dZe	eed	<dZ3e	eed4<dZe	eed<dZe	eed<dZ
e	eed
<dZe	eed<dZe	eed<dZe	eed<dZe	eed<dZe	eed<dd�ZdS)�EnhancedBacktestResult�total_return�sharpe_ratio�max_drawdown�win_rate�equity_curve�	positions�tradesN�
annual_return�5volatility�
sortino_ratio�calmar_ratio�var_95�expected_shortfall�total_trades�profitable_trades�avg_trade_duration�metadatacCsVt|jt�r
t�|j�|_t|jt�rt�|j�|_t|jt�r)t�|j�|_dSdS)N)�6isinstancer�dict�pd�Seriesr
�	DataFramer)�self�r�>/Users/sandrine/Deepvest_system/src/models/backtest_results.py�
__post_init__%s�z$EnhancedBacktestResult.__post_init__)�__name__�7__module__�__qualname__�float�__annotations__rrrrrrrrrrr�intrrrrr!rrrr rs&891011r)12�dataclassesrr�typingrrr�pandasrrrrrr �<module>s