Create Histogram of Monthly Return with CSV and DataFrames

You could use the linked site option to download the monthly data in CSV format and then use the customary tools:

using CSV, DataFrames, Plots
file = "Shanghai Composite Historical Data_Monthly.csv"
df = CSV.read(file, DataFrame)
df.Price .= parse.(Float64, replace.(df.Price, "," => ""))
histogram(df.Price)

NB: had to get rid of the comma separator for thousands

1 Like