Skip to main content

historical

Get historical fund, category, index price

Source Code: [link]

openbb.funds.historical(loaded_funds: mstarpy.funds.Funds, start_date: str, end_date: str, comparison: str = "")

Parameters

NameTypeDescriptionDefaultOptional
loaded_fundsmstarpy.Fundsclass mstarpy.Funds instantiated with selected fundsNoneFalse
start_datestrstart date of the historical dataNoneFalse
end_datestrend date of the historical dataNoneFalse
comparisonstrcan be index, category, bothTrue

Returns

TypeDescription
pd.DataFrameDataframe containing historical data

Examples

from openbb_terminal.sdk import openbb
f = openbb.funds.load("Vanguard", "US")
openbb.funds.historical(f, "2020-01-01", "2020-12-31")