Reputation: 1
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!
Upvotes: 0
Views: 656
Reputation: 2284
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
Upvotes: -1