powered by
Estimate the net change of a stock in discrete times
sd_net_change(sim_df, cumulative_var)
A dataframe.
A data frame with the simulation output
A string that indicates to which variable the discrete change will be estimated
test_output <- data.frame(time = seq(0, 2, by = 0.25), C = c(0, rep(5,4), rep(20, 4))) sd_net_change(test_output, "C")
Run the code above in your browser using DataLab