0
votes

I am having trouble creating my own Monte Carlo simulator with python 3... I am trying to predict the future price in the upcoming year. I am still learning how to program in python.

My data:

Price = np.array([29429,30426,32513,40605,52806,57581]) 
Year = np.array([1970,1971,1972,1973,1974,1975])

Attempted Monte Carlo Simulator..

N_pts_per_fit = 30
indices= random.randint(0,Price,N_pts_per_fit)
for i in range[N_pts_per_fit]:
    newdata = indices

Let me know if I am posting questions correctly and feedback on my approach. Thank you and have a great day!

  • Bob
1
It's not clear what you are asking. what happens when you run your code? what are you having trouble with? - Eamonn McEvoy
Not like I am an expert in Monte Carlo method, but can it even be used to predict trends? - Headcrab

1 Answers

-1
votes

Range should have parentheses:

range(N_pts_per_fit)

and are you wanting to store each newdata? I assume you have more code in the for statement