Skip to content Skip to sidebar Skip to footer

Create And Index From Returns PANDAS

I have the following dataframe where the first two columns are monthly returns (you have to multiply by 100 to get it in %) in_scenario_USA out_scenario_USA USA m

Solution 1:

Should be something like this i think:

df['First index'] = df.in_scenario_USA.cumsum().add(1)

Post a Comment for "Create And Index From Returns PANDAS"