| Overall Statistics |
|
Total Orders 3 Average Win 0% Average Loss 0% Compounding Annual Return 4.302% Drawdown 1.600% Expectancy 0 Start Equity 100000.00 End Equity 100046.17 Net Profit 0.046% Sharpe Ratio 3.105 Sortino Ratio 5.989 Probabilistic Sharpe Ratio 0% Loss Rate 0% Win Rate 0% Profit-Loss Ratio 0 Alpha 1.08 Beta -0.072 Annual Standard Deviation 0.162 Annual Variance 0.026 Information Ratio -37.336 Tracking Error 0.201 Treynor Ratio -6.959 Total Fees $0.00 Estimated Strategy Capacity $1700000.00 Lowest Capacity Asset GBPZAR 8G Portfolio Turnover 52.61% |
# region imports
from AlgorithmImports import *
# endregion
class WellDressedRedFly(QCAlgorithm):
def initialize(self):
self.set_start_date(2021, 2, 1)
self.set_end_date(2021, 2, 4)
self.set_cash(100000)
self.add_forex("GBPZAR", Resolution.HOUR)
self.add_forex("USDNOK", Resolution.HOUR)
def on_data(self, data: Slice):
if self.Time == datetime(2021, 2, 1, 19):
# Gets executed
sym = "GBPZAR"
quant = self.calculate_order_quantity(sym, 1)
if not quant:
self.log(str(self.Time) + " not bought " + sym)
self.market_order(sym, quantity = quant)
if self.Time == datetime(2021, 2, 2, 19):
# Gets executed
sym = "USDNOK"
quant = self.calculate_order_quantity(sym, 1)
if not quant:
self.log(str(self.Time) + " not bought " + sym)
self.market_order(sym, quantity = quant)
if self.Time == datetime(2021, 2, 3, 19):
# Not executed because quant is None
sym = "GBPZAR"
quant = self.calculate_order_quantity(sym, 1)
if not quant:
self.log(str(self.Time) + " not bought " + sym)
self.market_order(sym, quantity = quant)
sym = "USDNOK"
quant = self.calculate_order_quantity(sym, 1)
if not quant:
self.log(str(self.Time) + " not bought " + sym)
self.market_order(sym, quantity = quant)
# Gets executed
self.market_order(sym, quantity = 10000)