I have a number of given time series for bond yields (given in a dataframe in pandas package in Python). I need to do the following task in Python:
"1. Simulate 1000 path 30 steps ahead for any yield series you chose:
a. Plot the paths for any one index you chose
b. Plot the density for each index at step 30
Using the yield-difference data randomly sample 30 different values from the series. Calculate the cumulative sum of the 30 values. This gives you a possible path of yields if we start at a value of zero, but since the latest yield is not zero, we have to add it to each member of the path. Repeat this 1000 times for each series. This is a type of Monte Carlo simulation. You can use a different bootstrapping scheme for your Monte Carlo if you wish."
As a total noob in finance and programming, I am struggling to understand what I am actually required to do and how to go about this. Does the question require me to: pick out at random 30 values of a given time series, and then essentially use these 30 values to "predict" what the future values will be? And then re-do this procedure 1000 times? Or something else?
I'd be grateful if someone could explain the meaning of this task and what I could do in Python for it. Thank you.