His calling as a poet only began when he signed up for ChatGTP
Printable View
here's the code for you sailor for your moving average crossover
def calculate_sma(data, window):
sma = []
for i in range(len(data)):
if i < window:
sma.append(None) # Placeholder for SMA until enough data points are available
else:
sma.append(sum(data[i-window:i]) / window)
return sma
def moving_average_crossover(data, short_window, long_window):
sma_short = calculate_sma(data, short_window)
sma_long = calculate_sma(data, long_window)
crossover_points = []
for i in range(1, len(data)):
if sma_short[i-1] < sma_long[i-1] and sma_short[i] > sma_long[i]:
crossover_points.append(i)
return crossover_points
# Example usage:
data = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
short_window = 3
long_window = 5
crossover_points = moving_average_crossover(data, short_window, long_window)
print(crossover_points)
you can program it into your algo and trade it thru interactive brokers , the codes in python
Did you get ChatGPT to write that? Haha
Also note ChatGpt is trained on data only up to September 2021. I have a tabs permanently open in my browser for both ChatGPT and Bard. I use them for possibly 50% of my work now though I can't use code, data or other IP specific to any of my clients. For what I do (code) its utterly ground breaking. However, do not believe everything they say. I have found errors and cross reference a lot. In my view AI will have a bigger impact on society than the internet. I am a believer (with a healthy dose of scepticism). All hail the AI
@sailor, no it's a good thing. Im spending now, not putting new money to work. So every year I take a chunk of money and spend it. I don't want to see a 90 per cent drop like from 1929 to 1932.
When you retire (for good) you will understand where I'm coming from. I use to love a decent bear market when I had cash flooding in, now I'm ok with them but hoping it doesn't drag on for too long. Sequence of return risk: I'm almost past the danger zone. With this new bull market, I think I'm in the clear.
We're in a new bull market!
My bread and butter is the backend for boring commercial work, airlines, crypto, media. My own work involve trading/investment strategies: momentum, trend, crypto perpetual futures funding rate arbitrage, risk parity - though having kids and a real job means I don't get as much time as I like on the good stuff. I also have written indicators on TradingView some of those have become relatively popular