Overall Statistics
Total Trades
1
Average Win
0%
Average Loss
0%
Compounding Annual Return
72.482%
Drawdown
1.700%
Expectancy
0
Net Profit
6.103%
Sharpe Ratio
4.535
Sortino Ratio
5.502
Probabilistic Sharpe Ratio
88.912%
Loss Rate
0%
Win Rate
0%
Profit-Loss Ratio
0
Alpha
0.071
Beta
0.963
Annual Standard Deviation
0.092
Annual Variance
0.008
Information Ratio
3.543
Tracking Error
0.016
Treynor Ratio
0.433
Total Fees
$1.06
Estimated Strategy Capacity
$280000000.00
Lowest Capacity Asset
SPY R735QTJ8XC9X
Portfolio Turnover
2.49%
# region imports
from AlgorithmImports import *
from tlt import *

# endregion

class UglyBluePig(QCAlgorithm):

    def Initialize(self):
        self.SetStartDate(2024, 1, 1)
        self.SetCash(100000)
        self.AddEquity("SPY", Resolution.Hour)
     

    def OnData(self, data: Slice):
        
        invested = [ x.Symbol.Value for x in self.Portfolio.Values if x.Invested ] 
        self.Log("invested: " + str(invested))
        if not self.Portfolio.Invested:
            self.SetHoldings("SPY", 1)

        #self.Log ('The result of f:'+str(f()))
        ugly_blue_pig = UglyBluePig()
        b = B(ugly_blue_pig)
         
        self.Log ('The result of b.Call_a is:'+str(b.Call_a()))

        

class B:
    def __init__(self, algo):
        self.algo=algo

    def Call_a(self):
        #profit= self.Portfolio["SPY"].TotalCloseProfit()
        self.algo.Log("This is Call_a to the Log")
        self.algo.Debug("This is Call_a to Debug")
        return 2
       
        
   
#region imports
from AlgorithmImports import *
#endregion


def f():
    #UglyBluePig.Log("This is tlt")
    return 1

def g():
    return 2

# Your New Python File