Download Fundamental Data

YFinance.get_FundamentalFunction
get_Fundamental(symbol::AbstractString, item::AbstractString,interval::AbstractString, startdt, enddt)

Retrievs financial statement information from Yahoo Finance stored in a Dictionary.

Arguments

  • smybol::String is a ticker (e.g. AAPL for Apple Computers, or ^GSPC for the S&P500)

  • item::String can either be an entire financial statement or a subitem. Entire financial statements:"incomestatement", "valuation", "cashflow", "balancesheet". To see valid sub items grouped by financial statement type in a Dictionary call `Fundamental_Types`

  • interval::String can be one of "annual", "quarterly", "monthly"

  • startdt and enddt take the following types: ::Date,::DateTime, or a String of the following form yyyy-mm-dd

  • throw_error::Bool defaults to false. If set to true the function errors when the ticker is not valid. Else a warning is given and an empty dictionary is returned.

Examples

julia> get_Fundamental("NFLX", "income_statement","quarterly","2000-01-01","2022-12-31")

Dict{String, Any} with 39 entries:
"NetNonOperatingInterestIncomeExpense" => Any[-94294000, -80917000, 8066000, 44771000, 88829000]
"NetInterestIncome"                    => Any[-94294000, -80917000, 8066000, 44771000, 88829000]
"InterestExpense"                      => Any[190429000, 189429000, 187579000, 175455000, 172575000]
⋮                                      => ⋮

julia> using DataFrames
julia> get_Fundamental("AAPL", "InterestExpense","quarterly","2000-01-01","2022-12-31") |> DataFrame
5×2 DataFrame
Row │ InterestExpense  timestamp
    │ Any              DateTime
────┼──────────────────────────────────────
  1 │ 672000000        2021-09-30T00:00:00 
  2 │ 694000000        2021-12-31T00:00:00
  3 │ 691000000        2022-03-31T00:00:00
  4 │ 719000000        2022-06-30T00:00:00
  5 │ 827000000        2022-09-30T00:00:00