Overall Statistics
Total Orders
1
Average Win
0%
Average Loss
0%
Compounding Annual Return
37.904%
Drawdown
38.500%
Expectancy
0
Start Equity
100000
End Equity
300072.21
Net Profit
200.072%
Sharpe Ratio
0.991
Sortino Ratio
1.101
Probabilistic Sharpe Ratio
42.961%
Loss Rate
0%
Win Rate
0%
Profit-Loss Ratio
0
Alpha
0.148
Beta
1.229
Annual Standard Deviation
0.286
Annual Variance
0.082
Information Ratio
0.948
Tracking Error
0.182
Treynor Ratio
0.231
Total Fees
$12.28
Estimated Strategy Capacity
$170000000.00
Lowest Capacity Asset
AAPL R735QTJ8XC9X
Portfolio Turnover
0.08%
from AlgorithmImports import *
from QuantConnect.DataSource import *

class USEquityDataAlgorithm(QCAlgorithm):

    def initialize(self) -> None:
        self.set_start_date(2018, 1, 1)
        self.set_end_date(2021, 6, 1)
        self.set_cash(100000)
        
        # Requesting data
        self.aapl = self.add_equity("AAPL", Resolution.DAILY).symbol
        
        # Historical data
        history = self.history(self.aapl, 60, Resolution.DAILY)
        self.debug(f"We got {len(history)} items from our history request")

    def on_data(self, slice: Slice) -> None:
        if slice.contains_key(self.aapl) and slice[self.aapl] is not None and not self.portfolio.invested:
            self.set_holdings(self.aapl, 1)