Overall Statistics
Total Orders
1
Average Win
0%
Average Loss
0%
Compounding Annual Return
-50.894%
Drawdown
9.200%
Expectancy
0
Start Equity
100000
End Equity
94690.40
Net Profit
-5.310%
Sharpe Ratio
-1.956
Sortino Ratio
-2.661
Probabilistic Sharpe Ratio
12.919%
Loss Rate
0%
Win Rate
0%
Profit-Loss Ratio
0
Alpha
-0.11
Beta
0.998
Annual Standard Deviation
0.199
Annual Variance
0.04
Information Ratio
-1.481
Tracking Error
0.074
Treynor Ratio
-0.391
Total Fees
$2.89
Estimated Strategy Capacity
$510000000.00
Lowest Capacity Asset
AAPL R735QTJ8XC9X
Portfolio Turnover
3.53%
from AlgorithmImports import *
from QuantConnect.DataSource import *

class QuiverInsiderTradingAlgorithm(QCAlgorithm):
    
    def initialize(self):
        self.set_start_date(2022, 2, 1)   #Set Start Date
        self.set_end_date(2022, 2, 28)    #Set End Date
        self.aapl = self.add_equity("AAPL", Resolution.DAILY).symbol
        self.dataset_symbol = self.add_data(QuiverInsiderTrading, self.aapl).symbol

        # history request
        history = self.history(self.dataset_symbol, 10, Resolution.DAILY)
        self.debug(f"We got {len(history)} items from historical data request of {self.dataset_symbol}.")

    def on_data(self, slice: Slice) -> None:
        for insider_trades in slice.Get(QuiverInsiderTrading).values():
            for insider_trade in insider_trades:
                if insider_trade.shares > 0:
                    self.set_holdings(self.aapl, 1)
                else:
                    self.liquidate(self.aapl)