#🔒 Different Outputs every Time I run the program

13 messages · Page 1 of 1 (latest)

odd gorge
#

I'm trying to do a python program that tests a trading strategy as this article describes:
https://www.quantitativo.com/p/a-different-indicator?open=false#§the-david-varadi-oscillator

The program I built (with the help of chatGPT) is attached. The problem I'm having is that the output is different every time I run it, even though I selected a limited time frame so market movement shouldn't be a problem.

Using an unusual indicator to inform a strategy that delivers 21% annual returns since 2004

unique mortarBOT
unique mortarBOT
#

@odd gorge

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

true scarab
#

if your testing it you should capture data and make it static

fickle flax
#

a good testing strategy in this case is to capture data at two closely related points then follow your algorithm manually to see if it's doing what you expect

odd gorge
#

ok I'll reduce the time frame and will try to understand what is he doing

fickle flax
#

it might be that the results are expected

odd gorge
#

I'm kind of new to programming what I believe is happening is that I'm requesting a lot of data from yfinance and yfinance is not giving me all the data I'm requesting so that changes the result

fickle flax
#

if you think that's true then investigating the data and making sure you're getting what you expect is a good first step

#

and then you can save it and walk through the program step by step

odd gorge
#

alright thanks, I'll try to do that.

unique mortarBOT
#
Python help channel closed for inactivity

This help channel has been closed. Feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.