| Overall Statistics |
|
Total Trades 1 Average Win 0% Average Loss 0% Compounding Annual Return 28.273% Drawdown 5.400% Expectancy 0 Net Profit 13.190% Sharpe Ratio 2.496 Probabilistic Sharpe Ratio 79.248% Loss Rate 0% Win Rate 0% Profit-Loss Ratio 0 Alpha -0 Beta 0.997 Annual Standard Deviation 0.123 Annual Variance 0.015 Information Ratio -2.851 Tracking Error 0 Treynor Ratio 0.309 Total Fees $1.28 Estimated Strategy Capacity $53000000.00 Lowest Capacity Asset SPY R735QTJ8XC9X |
import cython
@cython.locals(a=cython.double, b=cython.double)
def foo(a, b):
return a + b
@cython.cclass
class A:
cython.declare(a=cython.int, b=cython.int)
c = cython.declare(cython.int, visibility='public')
d = cython.declare(cython.int) # private by default.
e = cython.declare(cython.int, visibility='readonly')
def __init__(self, a, b, c, d=5, e=3):
self.a = a
self.b = b
self.c = c
self.d = d
self.e = e
class CasualYellowGreenCaribou(QCAlgorithm):
def Initialize(self):
self.SetStartDate(2021, 2, 10)
self.SetCash(100000)
self.AddEquity("SPY", Resolution.Minute)
def OnData(self, data):
''' OnData event is the primary entry point for your algorithm. Each new data point will be pumped in here.
Arguments:
data: Slice object keyed by symbol containing the stock data
'''
# Check if we're not invested and then put portfolio 100% in the SPY ETF.
if not self.Portfolio.Invested:
self.SetHoldings("SPY", 1)
self.Log(foo(1,2))
self.Log(A(1,2,-3).c)