Overall Statistics
Total Trades
2
Average Win
0%
Average Loss
0%
Compounding Annual Return
5.529%
Drawdown
1.000%
Expectancy
0
Net Profit
2.869%
Sharpe Ratio
1.791
Probabilistic Sharpe Ratio
74.356%
Loss Rate
0%
Win Rate
0%
Profit-Loss Ratio
0
Alpha
0.036
Beta
0.006
Annual Standard Deviation
0.021
Annual Variance
0
Information Ratio
-1.595
Tracking Error
0.172
Treynor Ratio
6.364
Total Fees
$0.00
namespace QuantConnect.Algorithm.CSharp
{
    public class NadionUncoupledAtmosphericScrubbers : QCAlgorithm
    {

		private Symbol btcusd, ethbtc, xrpbtc;
		private decimal usdAmount = 10.0m;

        public override void Initialize()
        {
            SetStartDate(2020, 4, 18); 
            SetCash("BTC", 0.5m);    
            
            btcusd = AddCrypto("BTCUSD", Resolution.Daily).Symbol;
            ethbtc = AddCrypto("ETHBTC", Resolution.Daily).Symbol;
            xrpbtc = AddCrypto("XRPBTC", Resolution.Daily).Symbol;
        }

        public override void OnData(Slice data)
        {
        	if (!data.ContainsKey("BTCUSD") | !data.ContainsKey("ETHBTC") | !data.ContainsKey("XRPBTC"))
        	{
        		return;
        	}
        	
        	decimal btcAmount = usdAmount / data[btcusd].Close;
        	Plot("10USD in BTC", "Value", btcAmount);
        	
        	if (!Portfolio.Invested)
            {
            	Log("Ordering with " + btcAmount + "BTC");
            	
                // Buy $10USD worth of ETH with BTC
                MarketOrder(ethbtc, btcAmount / data[ethbtc].Close);
                
                // Buy $10USD worth of XRP with BTC
                MarketOrder(xrpbtc, btcAmount / data[xrpbtc].Close);
            }
        }
        
        public override void OnEndOfDay()
        {
        	Plot("BTC", "Holdings", Portfolio.CashBook["BTC"].Amount);
        }

    }
}