Overall Statistics
Total Trades
1
Average Win
0%
Average Loss
0%
Compounding Annual Return
0.309%
Drawdown
0.800%
Expectancy
0
Net Profit
1.435%
Sharpe Ratio
0.244
Probabilistic Sharpe Ratio
0.820%
Loss Rate
0%
Win Rate
0%
Profit-Loss Ratio
0
Alpha
0.004
Beta
-0.009
Annual Standard Deviation
0.011
Annual Variance
0
Information Ratio
-0.904
Tracking Error
0.177
Treynor Ratio
-0.298
Total Fees
$0.00
Estimated Strategy Capacity
$0
Lowest Capacity Asset
USDRUB.USDRUB 2S
class MultidimensionalCalibratedChamber(QCAlgorithm):

    def Initialize(self):
        self.SetStartDate(2017, 1, 13)  # Set Start Date
        self.SetCash(100000)  # Set Strategy Cash
        self.AddEquity('SPY', Resolution.Daily)
        self.symbol = self.AddData(USDRUB, 'USDRUB', Resolution.Daily).Symbol

    def OnData(self, data):
        if data.ContainsKey(self.symbol):
            self.Plot('USDRUB', 'Open', data[self.symbol].Open)
            self.Plot('USDRUB', 'High', data[self.symbol].High)
            self.Plot('USDRUB', 'Low', data[self.symbol].Low)
            self.Plot('USDRUB', 'Close', data[self.symbol].Close)
            self.Plot('USDRUB', 'Volume', data[self.symbol].Volume)
            self.Plot('USDRUB', 'PCT_CHANGE', data[self.symbol].GetProperty('pct_change'))
        
        if not self.Portfolio.Invested:
            self.SetHoldings(self.symbol, 1)
        
class USDRUB(PythonData):
    ''' Weather based rebalancing'''

    def GetSource(self, config, date, isLive):
        source = "https://raw.githubusercontent.com/foranpower/qc_CustomData/main/btc5.csv"
        return SubscriptionDataSource(source, SubscriptionTransportMedium.RemoteFile);


    def Reader(self, config, line, date, isLive):
        # If first character is not digit, pass
        if not (line.strip() and line[0].isdigit()): return None

        data = line.split(',')
        usdrub = USDRUB()
        usdrub.Symbol = config.Symbol
        usdrub.Time = datetime.strptime(data[0], '%m/%d/%Y') # with or without this following "data[0]" is fine .split(' ')[0]
        usdrub.Value = float(data[4])
        usdrub['Open'] = float(data[1])
        usdrub['High'] = float(data[2])
        usdrub['Low'] = float(data[3])
        usdrub['Close'] = float(data[4])
        usdrub['Volume'] = float(data[6])
        usdrub['pct_change'] = float(data[5])
        
        return usdrub