Overall Statistics
Total Orders
1
Average Win
0%
Average Loss
0%
Compounding Annual Return
-5.978%
Drawdown
28.300%
Expectancy
0
Start Equity
100000
End Equity
93942.25
Net Profit
-6.058%
Sharpe Ratio
-0.069
Sortino Ratio
-0.085
Probabilistic Sharpe Ratio
10.663%
Loss Rate
0%
Win Rate
0%
Profit-Loss Ratio
0
Alpha
0.123
Beta
1.212
Annual Standard Deviation
0.264
Annual Variance
0.07
Information Ratio
0.676
Tracking Error
0.145
Treynor Ratio
-0.015
Total Fees
$3.40
Estimated Strategy Capacity
$330000000.00
Lowest Capacity Asset
AAPL R735QTJ8XC9X
Portfolio Turnover
0.27%
from AlgorithmImports import *
from QuantConnect.DataSource import *

class QuiverLobbyingDataAlgorithm(QCAlgorithm):

    def initialize(self) -> None:
        self.set_start_date(2021, 10, 7)   #Set Start Date
        self.set_end_date(2022, 10, 11)    #Set End Date
        self.aapl = self.add_equity("AAPL", Resolution.DAILY).symbol
        self.dataset_symbol = self.add_data(QuiverLobbyings, 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 lobbyings in slice.Get(QuiverLobbyings).values():
            if any([lobbying.amount > 50000 for lobbying in lobbyings]):
                self.set_holdings(self.aapl, 1)
            elif any([lobbying.amount < 10000 for lobbying in lobbyings]):
                self.set_holdings(self.aapl, -1)