Finpie Save Abandoned

Simple library to download some financial data.

Project README

Build Status PyPi Status

finpie - a simple library to download some financial data

For recreational and educational purposes. Creating easier access to some financial and news data.

This library is an ongoing project designed to facilitate access to financial and economic data. It tries to cover potentially useful or interesting data points but unfortunately some functions will only return single point data which however could be aggregated over time to construct a limited time series. On the other hand, some functions that retrieve large amounts of data or depending on the data source will take some time to run. See the function index for more information on issues of data availability and relative run time.

The company fundamentals module includes functions to retrive data from Yahoo Finance, MarketWatch, The Motley Fool, Finviz and Macrotrends. The price data module retrieves data from Yahoo Finance and CBOE. The news module enables historical news headline collection from the FT, NYT, WSJ, Barrons and Seeking Alpha based on keyword searches. The library also provides a function to get all Nasdaq-listed stock tickers as well as worldwide stock symbols (these need some cleaning still once retrieved).

If there are any issues, ideas or recommendations please feel free to reach out.


Changes for v0.1364

  • Added chromedriver versions 93.0.4577.15
  • Fixed yahoo price data
  • Updated news scrapes
  • Changes for v0.1362

  • Added chromedriver versions 91.0.4472.19
  • Updated macrotrends
  • Changes for v0.1362

  • Fixed macrotrends
  • Changes for v0.1361

  • Added chromedriver versions 89.0.4389.23
  • Added a linux driver
  • Added a country code option for market watch tickers
  • Removed Reuters news as they started limiting their search results.
  • Changes for v0.136

  • Updated NewsData.barrons() to enable article collection from Barrons' company site
  • Added an option to NewsData.filter() function to choose between filtering on headlines, descriptions or both
  • Removed the economic data module for now
  • Changes for v0.133

  • Updated the Windows and Mac Chromedrivers to 86.\*.\*\*\*\*.\*\*\*
  • Updated code for data from Macrotrends
  • Added function to retrive CFTC data to other data section
  • Changes for v0.13

  • Restructured the fundamental data module to reduce clutter and simplify the repository
  • Excluded Bloomberg news headline scrape because of the automation detection
  • Debugged news headline scrape
  • Removed third party price data API wrappers
  • v0.1312: added option to get press releases from Seeking Alpha, updated WSJ script and Yahoo executive info
  • Changes for v0.12

  • Added a section to download earnings call transcripts
  • Added a test file and Travis CI
  • Debugged failing tests
  • Changes for v0.11

  • Added function to get option prices from CBOE to the price_data module
  • Added EIA Petroleum data section to the economic_data module
  • Updated the Windows and Mac Chromedrivers to 85.\*.\*\*\*\*.\*\*\* (had included an older Windows Chromedriver before)

  • To do list:

    • Refactor the news scrape..
    • Rework economic data module
    • Add USDA data
    • Add social media data (Twitter, Stocktwits, Weibo, Reddit WSB?)
    • Add async requests, multiple/batch download options, proxies..

    Documentation

    1. Installation
    2. Function index
    3. Company fundamental data
    4. Price data
    5. News data
    6. Other data
    7. Sources
    8. License

    Installation

    Python3 is required. Google Chrome version 89.*.****.*** or higher is required for some functions involving Selenium (can be found here).

    Note that Selenium may not be able to use Chrome in combination with Firewalls and the functions may fail to execute..

    $ pip install finpie
    

    Requirements

    beautifulsoup4>=4.9.1
    dask>=2.11.0
    numpy>=1.18.2
    pandas>=1.0.1
    requests>=2.22.0
    requests_html>=0.10.0
    selenium>=3.141.0
    tqdm>=4.32.1
    

    Index

    Output Data Output Runtime
    Company Fundamentals
    fd = Fundamentals( ticker, source, freq )
    Financial statements
  • fd.income_statement()
  • up to 2005 Slow, depends on source
  • fd.balance_sheet()
  • up to 2005 Slow, depends on source
  • fd.cashflow_statement()
  • up to 2005 Slow, depends on source
    Financial ratios and key metrics
  • fd.ratios()
  • up to 2005 Slow
  • fd.key_metrics()
  • Most recent data Fast
    Earnings and revenue estimates
  • fd.earnings_estimates()
  • Most recent data Fast
  • fd.earnings_estimates_trends()
  • Recent trend Fast
  • fd.earnings_history()
  • 4 quarters Fast
  • fd.revenue_estimates()
  • Most recent data Fast
  • fd.growth_estimates()
  • Most recent data Fast
    Earnings call transcripts
  • fd.transcripts()
  • up to 2018 Slow
    Insider transactions and analyst ratings
  • fd.insider_transactions()
  • Most recent data Fast
  • fd.analyst_ratings()
  • Most recent data Fast
    ESG data
  • fd.esg_score()
  • Most recent data Fast
  • fd.corporate_governance_score()
  • Most recent data Fast
    Company profile
  • fd.profile()
  • Most recent data Fast
  • fd.executives_info()
  • Most recent data Fast
    Price data
  • historical_prices(ticker)
  • Timeseries Fast
  • yahoo_option_chain(ticker)
  • Most recent data Fast
  • cboe_option_chain(ticker)
  • Most recent data Fast
  • historical_futures_contracts(date_range)
  • Timeseries Very slow
  • futures_contracts(date)
  • Any date Fast
    News data
    news = NewsData( ticker, keyword_string )
  • news.barrons()
  • Timeseries Slow
  • news.cnbc()
  • Timeseries Very slow
  • news.ft()
  • Timeseries Very slow
  • news.nyt()
  • Timeseries Very slow
  • news.seeking_alpha()
  • Timeseries Slow
  • news.wsj()
  • Timeseries Very slow
    Other data
  • nasdaq_tickers()
  • List of stock tickers Fast
  • global_tickers()
  • List of stock tickers Slow
  • cftc()
  • Timeseries Not that slow


    Company Fundamental data

    The functions below enable you to download financial statements, valuation ratios and key financial statistics as well as analyst ratings, insider transactions, ESG scores and company profiles.

    The data is pulled from Yahoo Finance, Marketwatch.com , Finviz.com and Macrotrends.com. The macrotrends scrape runs on Selenium and the website might sometimes fail to load. The function may just need to be re-run to work (assuming the ticker is available on the website). As a remedy it might sometimes help to set macrotrends().head = True which will then open a browser window while scraping the data.

    import finpie # or import finpie.fundamental_data
    
    # default:
    # source = 'macrotrends'
    # freq = 'A'
    fd = finpie.Fundamentals(ticker, source = 'macrotrends', freq = 'A')
    
    # source options for financial statements and key metrics:
    # 'yahoo', 'marketwatch', 'macrotrends'
    # freq options:
    # 'A', 'Q'
    
    # default key metrics for marketwatch and macrotrends come from Finviz
    
    

  • Financial statements
  • Fundamentals(ticker, source, freq).income_statement()

    • Returns a dataframe with income statements from either Macrotrends.com, Yahoo Finance or Marketwatch. Default source is 'macrotrends'.
      • Class Arguments:
        • ticker: valid company ticker
        • source: 'yahoo', 'marketwatch', 'macrotrends', default: 'macrotrends'
        • freq: 'A' (annual data), 'Q' (quarterly data), default: 'A'

    Default Example
    fd = finpie.Fundamentals('AAPL', freq = 'A')
    fd.income_statement()
    
    revenue cost_of_goods_sold gross_profit research_and_development_expenses sganda_expenses other_operating_income_or_expenses operating_expenses operating_income total_nonoperating_income_to_expense pretax_income income_taxes income_after_taxes other_income income_from_continuous_operations income_from_discontinued_operations net_income ebitda ebit basic_shares_outstanding shares_outstanding basic_eps eps__earnings_per_share
    date
    2005-09-30 13931.0 9889.0 4042.0 535.0 1864.0 NaN 12288.0 1643.0 165.0 1808.0 480.0 1328.0 NaN 1328.0 NaN 1328.0 1822.0 1643.0 22636.0 23993.0 0.06 0.06
    2006-09-30 19315.0 13717.0 5598.0 712.0 2433.0 NaN 16862.0 2453.0 365.0 2818.0 829.0 1989.0 NaN 1989.0 NaN 1989.0 2678.0 2453.0 23634.0 24571.0 0.08 0.08
    2007-09-30 24578.0 16426.0 8152.0 782.0 2963.0 NaN 20171.0 4407.0 599.0 5006.0 1511.0 3495.0 NaN 3495.0 NaN 3495.0 4734.0 4407.0 24209.0 24900.0 0.14 0.14
    2008-09-30 37491.0 24294.0 13197.0 1109.0 3761.0 NaN 29164.0 8327.0 620.0 8947.0 2828.0 6119.0 NaN 6119.0 NaN 6119.0 8823.0 8327.0 24685.0 25260.0 0.25 0.24
    2009-09-30 42905.0 25683.0 17222.0 1333.0 4149.0 NaN 31165.0 11740.0 326.0 12066.0 3831.0 8235.0 NaN 8235.0 NaN 8235.0 12474.0 11740.0 25004.0 25396.0 0.33 0.32
    Yahoo Example
    fd = finpie.Fundamentals('AAPL', source = 'yahoo') # no frequency choice for Yahoo...
    fd.income_statement()
    
    total_revenue cost_of_revenue gross_profit operating_expense operating_income net_non_operating_interest_income_expense other_income_expense pretax_income tax_provision net_income_common_stockholders diluted_ni_available_to_com_stockholders basic_eps diluted_eps basic_average_shares diluted_average_shares total_operating_income_as_reported total_expenses net_income_from_continuing_and_discontinued_operation normalized_income interest_income interest_expense net_interest_income ebit ebitda reconciled_cost_of_revenue reconciled_depreciation net_income_from_continuing_operation_net_minority_interest normalized_ebitda tax_rate_for_calcs tax_effect_of_unusual_items ticker
    date
    2019-09-30 260174000 161782000 98392000 34462000 63930000 1385000 422000 65737000 10481000 55256000 55256000 0.003 0.003 18471336 18595652 63930000 196244000 55256000 55256000 4961000 3576000 1385000 69313000 NaN 161782000 12547000 55256000 81860000 0 0 AAPL
    2018-09-30 265595000 163756000 101839000 30941000 70898000 2446000 -441000 72903000 13372000 59531000 59531000 0.003 0.003 19821508 20000436 70898000 194697000 59531000 59531000 5686000 3240000 2446000 76143000 NaN 163756000 10903000 59531000 87046000 0 0 AAPL
    2017-09-30 229234000 141048000 88186000 26842000 61344000 2878000 -133000 64089000 15738000 48351000 48351000 0.0023 0.0023 20868968 21006768 61344000 167890000 48351000 48351000 5201000 2323000 2878000 66412000 NaN 141048000 10157000 48351000 76569000 0 0 AAPL
    Marketwatch Example
    fd = Fundamentals('AAPL', source = 'marketwatch', freq = 'Q')
    fd.income_statement()
    
    sales_revenue sales_growth cost_of_goods_sold_(cogs)_incl_danda cogs_excluding_danda depreciation_and_amortization_expense depreciation amortization_of_intangibles cogs_growth gross_income gross_income_growth gross_profit_margin sganda_expense research_and_development other_sganda sga_growth other_operating_expense unusual_expense ebit_after_unusual_expense non_operating_income_expense non-operating_interest_income equity_in_affiliates_(pretax) interest_expense interest_expense_growth gross_interest_expense interest_capitalized pretax_income pretax_income_growth pretax_margin income_tax income_tax_-_current_domestic income_tax_-_current_foreign income_tax_-_deferred_domestic income_tax_-_deferred_foreign income_tax_credits equity_in_affiliates other_after_tax_income_(expense) consolidated_net_income minority_interest_expense net_income net_income_growth net_margin_growth extraordinaries_and_discontinued_operations extra_items_and_gain_loss_sale_of_assets cumulative_effect_-_accounting_chg discontinued_operations net_income_after_extraordinaries preferred_dividends net_income_available_to_common eps_(basic) eps_(basic)_growth basic_shares_outstanding eps_(diluted) eps_(diluted)_growth diluted_shares_outstanding ebitda ebitda_growth ebitda_margin
    date
    2019-06-30 5.374e+10 nan 3.357e+10 3.064e+10 2.93e+09 2.93e+09 nan nan 2.017e+10 nan nan 8.68e+09 4.26e+09 4.43e+09 nan nan nan nan 9.8e+07 1.19e+09 nan 8.66e+08 nan 8.66e+08 nan 1.191e+10 nan nan 1.87e+09 nan nan nan nan nan nan nan 1.004e+10 nan 1.004e+10 nan nan nan nan nan nan 1.004e+10 nan 1.004e+10 0.55 nan 1.828e+10 0.55 nan 1.841e+10 1.442e+10 nan nan
    2019-09-30 6.394e+10 0.1897 3.977e+10 3.784e+10 1.93e+09 1.93e+09 nan 0.1848 2.417e+10 0.1979 nan 8.69e+09 4.11e+09 4.58e+09 0.0006 nan nan nan 3.54e+08 1.11e+09 nan 8.1e+08 -0.0647 8.1e+08 nan 1.613e+10 0.354 nan 2.44e+09 nan nan nan nan nan nan nan 1.369e+10 nan 1.369e+10 0.3626 nan nan nan nan nan 1.369e+10 nan 1.369e+10 0.76 0.3868 1.796e+10 0.76 0.387 1.808e+10 1.741e+10 0.2071 nan
    2019-12-31 9.172e+10 0.4346 5.677e+10 5.396e+10 2.82e+09 2.82e+09 nan 0.4275 3.495e+10 0.4463 nan 9.65e+09 4.45e+09 5.2e+09 0.1105 nan -1.28e+08 1.28e+08 2.29e+08 1.05e+09 nan 7.85e+08 -0.0309 7.85e+08 nan 2.592e+10 0.6071 nan 3.68e+09 nan nan nan nan nan nan nan 2.224e+10 nan 2.224e+10 0.6247 nan nan nan nan nan 2.224e+10 nan 2.224e+10 1.26 0.6526 1.766e+10 1.25 0.6487 1.782e+10 2.812e+10 0.6151 nan
    2020-03-31 5.835e+10 -0.3639 3.593e+10 3.315e+10 2.79e+09 2.79e+09 nan -0.3671 2.242e+10 -0.3586 nan 9.52e+09 4.57e+09 4.95e+09 -0.0136 nan -1.26e+08 1.26e+08 -1.82e+08 1.05e+09 nan 7.57e+08 -0.0357 7.57e+08 nan 1.314e+10 -0.4932 nan 1.89e+09 nan nan nan nan nan nan nan 1.125e+10 nan 1.125e+10 -0.4941 nan nan nan nan nan 1.125e+10 nan 1.125e+10 0.65 -0.4877 1.744e+10 0.64 -0.4883 1.762e+10 1.569e+10 -0.4422 nan
    2020-06-30 5.942e+10 0.0183 3.737e+10 3.462e+10 2.75e+09 2.75e+09 nan 0.04 2.205e+10 -0.0164 0.3711 9.59e+09 4.76e+09 4.83e+09 0.0076 nan -1.19e+08 1.19e+08 3.55e+08 901M nan 6.97e+08 -0.0793 6.97e+08 nan 1.314e+10 0.0002 0.2211 1.88e+09 nan nan nan nan nan nan nan 1.125e+10 nan 1.125e+10 0.0004 0.1894 nan nan nan nan 1.125e+10 nan 1.125e+10 0.65 0.0113 1.725e+10 0.65 0.0117 1.742e+10 1.521e+10 -0.0302 0.256


    Fundamentals(ticker, source, freq).balance_sheet()

    • Returns a dataframe with balance sheets from either Macrotrends.com, Yahoo Finance or Marketwatch. Default source is 'macrotrends'.
      • Class Arguments:
        • ticker: valid company ticker
        • source: 'yahoo', 'marketwatch', 'macrotrends', default: 'macrotrends'
        • freq: 'A' (annual data), 'Q' (quarterly data), default: 'A'

    Default Example
    fd = Fundamentals('AAPL', freq = 'A')
    fd.balance_sheet()
    
    cash_on_hand receivables inventory prepaid_expenses other_current_assets total_current_assets property,_plant,_and_equipment longterm_investments goodwill_and_intangible_assets other_longterm_assets total_longterm_assets total_assets total_current_liabilities long_term_debt other_noncurrent_liabilities total_long_term_liabilities total_liabilities common_stock_net retained_earnings_(accumulated_deficit) comprehensive_income other_share_holders_equity share_holder_equity total_liabilities_and_share_holders_equity
    date
    2005-09-30 8261.0 895.0 165.0 NaN 648.0 10300.0 817.0 NaN 96.0 303.0 1216.0 11516.0 3487.0 NaN 601.0 601.0 4088.0 3564.0 3925.0 NaN NaN 7428.0 11516.0
    2006-09-30 10110.0 1252.0 270.0 NaN 2270.0 14509.0 1281.0 NaN 177.0 1238.0 2696.0 17205.0 6443.0 NaN 778.0 778.0 7221.0 4355.0 5607.0 22.0 NaN 9984.0 17205.0
    2007-09-30 15386.0 1637.0 346.0 NaN 3805.0 21956.0 1832.0 NaN 337.0 1222.0 3391.0 25347.0 9280.0 NaN 1535.0 1535.0 10815.0 5368.0 9101.0 63.0 NaN 14532.0 25347.0
    2008-09-30 22111.0 2422.0 509.0 NaN 3920.0 30006.0 2455.0 2379.0 492.0 839.0 6165.0 36171.0 11361.0 NaN 1745.0 2513.0 13874.0 7177.0 15129.0 9.0 NaN 22297.0 36171.0
    2009-09-30 23464.0 5057.0 455.0 NaN 1444.0 31555.0 2954.0 10528.0 453.0 2011.0 15946.0 47501.0 11506.0 NaN 3502.0 4355.0 15861.0 8210.0 23353.0 77.0 NaN 31640.0 47501.0
    Yahoo Example
    fd = Fundamentals('AAPL', source = 'yahoo') # no frequency choice for Yahoo...
    fd.balance_sheet()
    
    total_assets total_liabilities_net_minority_interest total_equity_gross_minority_interest total_capitalization common_stock_equity net_tangible_assets working_capital invested_capital tangible_book_value total_debt net_debt share_issued ordinary_shares_number ticker
    date
    2019-09-30 338516000 248028000 90488000 182295000 90488000 90488000 57101000 198535000 90488000 108047000 59203000 17772944 17772944 AAPL
    2018-09-30 365725000 258578000 107147000 200882000 107147000 107147000 14473000 221630000 107147000 114483000 88570000 19019944 19019944 AAPL
    2017-09-30 375319000 241272000 134047000 231254000 134047000 126032000 27831000 249727000 126032000 115680000 95391000 20504804 20504804 AAPL
    Marketwatch Example
    fd = Fundamentals('AAPL', source = 'marketwatch', freq = 'Q')
    fd.balance_sheet()
    
    cash_and_short_term_investments cash_only short-term_investments cash_and_short_term_investments_growth cash_and_st_investments___total_assets total_accounts_receivable accounts_receivables_net accounts_receivables_gross bad_debt_doubtful_accounts other_receivables accounts_receivable_growth accounts_receivable_turnover inventories finished_goods work_in_progress raw_materials progress_payments_and_other other_current_assets miscellaneous_current_assets total_current_assets net_property_plant_and_equipment property_plant_and_equipment_-_gross buildings land_and_improvements computer_software_and_equipment other_property_plant_and_equipment accumulated_depreciation total_investments_and_advances other_long-term_investments long-term_note_receivable intangible_assets net_goodwill net_other_intangibles other_assets tangible_other_assets total_assets assets_-_total_-_growth st_debt_and_current_portion_lt_debt short_term_debt current_portion_of_long_term_debt accounts_payable accounts_payable_growth income_tax_payable other_current_liabilities dividends_payable accrued_payroll miscellaneous_current_liabilities total_current_liabilities long-term_debt long-term_debt_excl_capitalized_leases non-convertible_debt convertible_debt capitalized_lease_obligations provision_for_risks_and_charges deferred_taxes deferred_taxes_-_credit deferred_taxes_-_debit other_liabilities other_liabilities_(excl_deferred_income) deferred_income total_liabilities non-equity_reserves total_liabilities___total_assets preferred_stock_(carrying_value) redeemable_preferred_stock non-redeemable_preferred_stock common_equity_(total) common_stock_par_carry_value retained_earnings esop_debt_guarantee cumulative_translation_adjustment_unrealized_for_exch_gain unrealized_gain_loss_marketable_securities revaluation_reserves treasury_stock common_equity___total_assets total_shareholders\'_equity total_shareholders\'_equity___total_assets accumulated_minority_interest total_equity liabilities_and_shareholders\'_equity
    date
    2019-06-30 9.488e+10 2.29e+10 nan nan 0.2944 2.647e+10 1.415e+10 1.415e+10 nan 1.233e+10 nan 2.03 3.36e+09 3.36e+09 nan nan nan 1.026e+10 1.026e+10 1.3497e+11 3.764e+10 9.398e+10 nan nan nan nan 5.635e+10 1.1735e+11 1.1735e+11 nan nan nan nan 3.228e+10 3.228e+10 3.2224e+11 nan 2.348e+10 9.95e+09 1.353e+10 2.912e+10 nan nan 3.711e+10 nan nan 3.711e+10 8.97e+10 8.494e+10 8.494e+10 nan nan nan 3.052e+10 1.61e+10 1.61e+10 nan 4.52e+09 4.52e+09 nan 2.2578e+11 nan 0.7007 nan nan nan 9.646e+10 4.337e+10 5.372e+10 nan -1.18e+09 328M nan nan 0.2993 9.646e+10 0.2993 nan 9.646e+10 3.2224e+11
    2019-09-30 1.0058e+11 2.812e+10 nan 0.0601 0.2971 4.58e+10 2.293e+10 2.293e+10 nan 2.288e+10 0.7302 1.40 4.11e+09 4.11e+09 nan nan nan 1.233e+10 1.233e+10 1.6282e+11 3.738e+10 9.596e+10 nan nan nan nan 5.858e+10 1.067e+11 1.067e+11 nan nan nan nan 3.162e+10 3.162e+10 3.3852e+11 0.0505 1.624e+10 5.98e+09 1.026e+10 4.624e+10 0.588 nan 4.324e+10 nan nan 4.324e+10 1.0572e+11 9.181e+10 9.181e+10 nan nan nan 2.955e+10 1.692e+10 1.692e+10 nan 4.04e+09 4.04e+09 nan 2.4803e+11 nan 0.7327 nan nan nan 9.049e+10 4.517e+10 4.59e+10 nan -1.46e+09 707M nan nan 0.2673 9.049e+10 0.2673 nan 9.049e+10 3.3852e+11
    2019-12-31 1.0723e+11 2.299e+10 nan 0.0661 0.3148 3.995e+10 2.097e+10 2.097e+10 nan 1.898e+10 -0.1279 2.30 4.1e+09 4.1e+09 nan nan nan 1.196e+10 1.196e+10 1.6323e+11 4.429e+10 1.0525e+11 nan nan nan nan 6.096e+10 1.0173e+11 1.0173e+11 nan nan nan nan 3.137e+10 3.137e+10 3.4062e+11 0.0062 1.647e+10 6.24e+09 1.024e+10 4.511e+10 -0.0243 nan 4.058e+10 nan nan 4.058e+10 1.0216e+11 1.0028e+11 9.308e+10 nan nan 6.27e+08 2.82e+10 nan nan nan 2.045e+10 2.045e+10 nan 2.5109e+11 nan 0.7372 nan nan nan 8.953e+10 4.597e+10 4.398e+10 nan -1.26e+09 822M nan nan 0.2628 8.953e+10 0.2628 nan 8.953e+10 3.4062e+11
    2020-03-31 9.513e+10 2.996e+10 nan -0.1129 0.2969 3.068e+10 1.572e+10 1.572e+10 nan 1.496e+10 -0.232 1.90 3.33e+09 3.33e+09 nan nan nan 1.461e+10 1.461e+10 1.4375e+11 4.399e+10 1.0684e+11 nan nan nan nan 6.285e+10 1.0059e+11 1.0059e+11 nan nan nan nan 3.207e+10 3.207e+10 3.204e+11 -0.0594 2.163e+10 1.121e+10 1.041e+10 3.242e+10 -0.2813 nan 4.205e+10 nan nan 4.205e+10 9.609e+10 9.714e+10 8.909e+10 nan nan 6.29e+08 2.819e+10 nan nan nan 2.056e+10 2.056e+10 nan 2.4198e+11 nan 0.7552 nan nan nan 7.843e+10 4.803e+10 3.318e+10 nan -1.83e+09 -1.47e+09 nan nan 0.2448 7.843e+10 0.2448 nan 7.843e+10 3.204e+11
    2020-06-30 9.305e+10 2.73e+10 nan -0.0218 0.2932 3.208e+10 1.788e+10 1.788e+10 nan 1.419e+10 0.0456 1.85 3.98e+09 3.98e+09 nan nan nan 1.096e+10 1.096e+10 1.4007e+11 4.385e+10 1.0908e+11 nan nan nan nan 6.523e+10 1.0222e+11 1.0222e+11 nan nan nan nan 3.121e+10 3.121e+10 3.1734e+11 -0.0095 2.005e+10 1.252e+10 7.53e+09 3.533e+10 0.0896 nan 3.995e+10 nan nan 3.995e+10 9.532e+10 1.0214e+11 9.405e+10 nan nan 6.3e+08 2.819e+10 nan nan nan 1.942e+10 1.942e+10 nan 2.4506e+11 nan 0.7722 nan nan nan 7.228e+10 4.87e+10 2.414e+10 nan -1.63e+09 1.61e+09 nan nan 0.2278 7.228e+10 0.2278 nan 7.228e+10 3.1734e+11


    Fundamentals(ticker, source, freq).cashflow_statement()

    • Returns a dataframe with cashflow statements from either Macrotrends.com, Yahoo Finance or Marketwatch. Default source is 'macrotrends'.
      • Class Arguments:
        • ticker: valid company ticker
        • source: 'yahoo', 'marketwatch', 'macrotrends', default: 'macrotrends'
        • freq: 'A' (annual data), 'Q' (quarterly data), default: 'A'

    Default Example
    fd = Fundamentals('AAPL', freq = 'A')
    fd.cashflow_statement()
    
    net_income_to_loss total_depreciation_and_amortization__cash_flow other_noncash_items total_noncash_items change_in_accounts_receivable change_in_inventories change_in_accounts_payable change_in_assets_to_liabilities total_change_in_assets_to_liabilities cash_flow_from_operating_activities net_change_in_property,_plant,_and_equipment net_change_in_intangible_assets net_acquisitions_to_divestitures net_change_in_shortterm_investments net_change_in_longterm_investments net_change_in_investments__total investing_activities__other cash_flow_from_investing_activities net_longterm_debt net_current_debt debt_issuance_to_retirement_net__total net_common_equity_issued_to_repurchased net_total_equity_issued_to_repurchased total_common_and_preferred_stock_dividends_paid financial_activities__other cash_flow_from_financial_activities net_cash_flow stockbased_compensation common_stock_dividends_paid
    date
    2005-09-30 1328.0 179.0 536.0 715.0 121.0 64.0 328.0 349.0 492.0 2535.0 260.0 NaN NaN 2861.0 586.0 2275.0 21.0 2556.0 NaN NaN NaN 543.0 543.0 NaN NaN 543.0 522.0 49.0 NaN
    2006-09-30 1989.0 225.0 231.0 456.0 357.0 105.0 1611.0 1374.0 225.0 2220.0 657.0 28.0 NaN 1057.0 25.0 1032.0 10.0 357.0 NaN NaN NaN 318.0 318.0 NaN 6.0 324.0 2901.0 163.0 NaN
    2007-09-30 3495.0 327.0 327.0 654.0 385.0 76.0 1494.0 288.0 1321.0 5470.0 735.0 251.0 NaN 2295.0 17.0 2312.0 49.0 3249.0 NaN NaN NaN 365.0 365.0 NaN 374.0 739.0 2960.0 242.0 NaN
    2008-09-30 6119.0 496.0 936.0 1432.0 785.0 163.0 596.0 2397.0 2045.0 9596.0 1091.0 108.0 220.0 6722.0 38.0 6760.0 10.0 8189.0 NaN NaN NaN 483.0 483.0 NaN 633.0 1116.0 2523.0 516.0 NaN
    2009-09-30 8235.0 734.0 1750.0 2484.0 939.0 54.0 92.0 233.0 560.0 10159.0 1144.0 69.0 NaN 16046.0 NaN 16046.0 175.0 17434.0 NaN NaN NaN 475.0 475.0 NaN 188.0 663.0 6612.0 710.0 NaN
    2010-09-30 14013.0 1027.0 2319.0 3346.0 2142.0 596.0 6307.0 2333.0 1236.0 18595.0 2005.0 116.0 638.0 11075.0 NaN 11075.0 20.0 13854.0 NaN NaN NaN 912.0 912.0 NaN 345.0 1257.0 5998.0 879.0 NaN
    2011-09-30 25922.0 1814.0 4036.0 5850.0 143.0 275.0 2515.0 2824.0 5757.0 37529.0 4260.0 3192.0 244.0 32464.0 NaN 32464.0 259.0 40419.0 NaN NaN NaN 831.0 831.0 NaN 613.0 1444.0 1446.0 1168.0 NaN
    2012-09-30 41733.0 3277.0 6145.0 9422.0 5551.0 15.0 4467.0 800.0 299.0 50856.0 8295.0 1107.0 350.0 38427.0 NaN 38427.0 48.0 48227.0 NaN NaN NaN 665.0 665.0 2488.0 125.0 1698.0 931.0 1740.0 2488.0
    2013-09-30 37037.0 6757.0 3394.0 10151.0 2172.0 973.0 2340.0 7283.0 6478.0 53666.0 8165.0 911.0 496.0 24042.0 NaN 24042.0 160.0 33774.0 16896.0 NaN 16896.0 22330.0 22330.0 10564.0 381.0 16379.0 3513.0 2253.0 10564.0
    2014-09-30 39510.0 7946.0 5210.0 13156.0 4232.0 76.0 5938.0 5417.0 7047.0 59713.0 9571.0 242.0 3765.0 9017.0 10.0 9027.0 26.0 22579.0 11960.0 6306.0 18266.0 44270.0 44270.0 11126.0 419.0 37549.0 415.0 2863.0 11126.0
    2015-09-30 53394.0 11257.0 5353.0 16610.0 417.0 238.0 5001.0 6082.0 11262.0 81266.0 11247.0 241.0 343.0 44417.0 NaN 44417.0 26.0 56274.0 27114.0 2191.0 29305.0 34710.0 34710.0 11561.0 750.0 17716.0 7276.0 3586.0 11561.0
    2016-09-30 45687.0 10505.0 9634.0 20139.0 527.0 217.0 2117.0 2456.0 405.0 66231.0 12734.0 297.0 NaN 30634.0 1388.0 32022.0 924.0 45977.0 22454.0 397.0 22057.0 30797.0 30797.0 12150.0 NaN 20890.0 636.0 4210.0 12150.0
    2017-09-30 48351.0 10157.0 10640.0 20797.0 2093.0 2723.0 8966.0 9073.0 4923.0 64225.0 12451.0 NaN 329.0 33147.0 395.0 33542.0 124.0 46446.0 25162.0 3852.0 29014.0 32345.0 32345.0 12769.0 1874.0 17974.0 195.0 4840.0 12769.0
    2018-09-30 59531.0 10903.0 27694.0 16791.0 5322.0 828.0 9175.0 30013.0 34694.0 77434.0 13313.0 NaN 721.0 32363.0 1518.0 30845.0 745.0 16066.0 469.0 37.0 432.0 72069.0 72069.0 13712.0 2527.0 87876.0 5624.0 5340.0 13712.0
    2019-09-30 55256.0 12547.0 5076.0 17623.0 245.0 289.0 1923.0 1521.0 3488.0 69391.0 10495.0 NaN 624.0 57460.0 633.0 58093.0 1078.0 45896.0 1842.0 5977.0 7819.0 66116.0 66116.0 14119.0 2922.0 90976.0 24311.0 6068.0 14119.0
    Yahoo Example
    fd = Fundamentals('AAPL', source = 'yahoo') # no frequency choice for Yahoo...
    fd.cashflow_statement()
    
    operating_cash_flow investing_cash_flow financing_cash_flow end_cash_position income_tax_paid_supplemental_data interest_paid_supplemental_data capital_expenditure issuance_of_capital_stock issuance_of_debt repayment_of_debt repurchase_of_capital_stock free_cash_flow ticker
    date
    2019-09-30 69391000 45896000 -90976000 50224000 15263000 3423000 -10495000 781000 6963000 -8805000 -66897000 58896000 AAPL
    2018-09-30 77434000 16066000 -87876000 25913000 10417000 3022000 -13313000 669000 6969000 -6500000 -72738000 64121000 AAPL
    2017-09-30 63598000 -46446000 -17347000 20289000 11591000 2092000 -12795000 555000 28662000 -3500000 -32900000 50803000 AAPL
    Marketwatch Example
    fd = Fundamentals('AAPL', source = 'marketwatch', freq = 'Q')
    fd.cashflow_statement()
    
    net_income_before_extraordinaries net_income_growth depreciation_depletion_and_amortization depreciation_and_depletion amortization_of_intangible_assets deferred_taxes_and_investment_tax_credit deferred_taxes investment_tax_credit other_funds funds_from_operations extraordinaries changes_in_working_capital receivables accounts_payable other_assets_liabilities net_operating_cash_flow net_operating_cash_flow_growth net_operating_cash_flow___sales capital_expenditures capital_expenditures_(fixed_assets) capital_expenditures_(other_assets) capital_expenditures_growth capital_expenditures___sales net_assets_from_acquisitions sale_of_fixed_assets_and_businesses purchase_sale_of_investments purchase_of_investments sale_maturity_of_investments other_uses other_sources net_investing_cash_flow net_investing_cash_flow_growth net_investing_cash_flow___sales cash_dividends_paid_-_total common_dividends preferred_dividends change_in_capital_stock repurchase_of_common_and_preferred_stk sale_of_common_and_preferred_stock proceeds_from_stock_options other_proceeds_from_sale_of_stock issuance_reduction_of_debt_net change_in_current_debt change_in_long-term_debt issuance_of_long-term_debt reduction_in_long-term_debt other_funds1 other_uses1 other_sources1 net_financing_cash_flow net_financing_cash_flow_growth net_financing_cash_flow___sales exchange_rate_effect miscellaneous_funds net_change_in_cash free_cash_flow free_cash_flow_growth free_cash_flow_yield
    date
    2019-06-30 1.004e+10 nan 2.93e+09 2.93e+09 nan nan 8.6e+07 nan 1.37e+09 1.443e+10 nan -2.8e+09 -214M 220M -4.31e+09 1.164e+10 nan 0.2165 -2e+09 -2e+09 nan nan -0.0372 -3.2e+08 nan 3.012e+10 -8.19e+09 3.831e+10 -2.68e+08 -3e+07 2.75e+10 nan 0.5118 -3.63e+09 -3.63e+09 nan -1.695e+10 -1.696e+10 1e+06 1e+06 nan -5.03e+09 -2.03e+09 -3e+09 nan -3e+09 -1.2e+09 -1.2e+09 nan -2.68e+10 nan -0.4988 nan nan 1.233e+10 9.64e+09 nan nan
    2019-09-30 1.369e+10 0.3626 3.18e+09 3.18e+09 nan nan -3.02e+08 nan 1.19e+09 1.775e+10 nan 2.16e+09 -1.932e+10 1.788e+10 4.38e+09 1.991e+10 0.7111 0.3114 -2.78e+09 -2.78e+09 nan -0.3885 -0.0434 -1.3e+07 nan 2.8e+09 -1.81e+10 2.09e+10 -8.1e+08 nan -798M -1.029 -0.0125 -3.48e+09 -3.48e+09 nan -1.705e+10 -1.744e+10 3.9e+08 3.9e+08 nan -293M -3.95e+09 3.66e+09 6.96e+09 -3.31e+09 -213M -213M nan -2.104e+10 0.2151 -0.3291 nan nan -1.93e+09 1.713e+10 0.778 nan
    2019-12-31 2.224e+10 0.6247 2.82e+09 2.82e+09 nan nan -3.49e+08 nan 1.57e+09 2.627e+10 nan 4.25e+09 5.92e+09 -1.09e+09 -555M 3.052e+10 0.5327 0.3327 -2.11e+09 -2.11e+09 nan 0.2413 -0.023 -9.58e+08 nan -1.047e+10 -3.749e+10 2.702e+10 -1.3e+08 nan -1.367e+10 -16.1278 -0.149 -3.54e+09 -3.54e+09 nan -2.07e+10 -2.071e+10 2e+06 2e+06 nan 231M -979M 1.21e+09 2.21e+09 -1e+09 -1.4e+09 -1.4e+09 nan -2.541e+10 -0.2076 -0.277 nan nan -8.56e+09 2.841e+10 0.6581 nan
    2020-03-31 1.125e+10 -0.4941 2.79e+09 2.79e+09 nan nan -3.02e+08 nan 1.58e+09 1.531e+10 nan -2e+09 9.29e+09 -1.243e+10 412M 1.331e+10 -0.5638 0.2281 -1.85e+09 -1.85e+09 nan 0.1206 -0.0318 -1.76e+08 nan 1.134e+10 -2.914e+10 4.048e+10 -2.96e+08 nan 9.01e+09 1.6594 0.1545 -3.38e+09 -3.38e+09 nan -1.815e+10 -1.857e+10 4.28e+08 4.28e+08 nan 803M 5.05e+09 -4.25e+09 nan -4.25e+09 -222M -222M nan -2.094e+10 0.1758 -0.3589 nan nan 1.38e+09 1.146e+10 -0.5967 nan
    2020-06-30 1.125e+10 0.0004 2.75e+09 2.75e+09 nan nan 8.33e+08 nan 1.86e+09 1.67e+10 nan -430M -1.37e+09 2.73e+09 -1.1e+09 1.627e+10 0.2224 0.2739 -1.57e+09 -1.57e+09 nan 0.1554 -0.0263 -3.39e+08 nan -3e+09 -3.018e+10 2.718e+10 -2.63e+08 nan -5.17e+09 -1.5731 -0.0869 -3.66e+09 -3.66e+09 nan -1.589e+10 -1.589e+10 nan nan nan 2.17e+09 1.12e+09 1.05e+09 8.43e+09 -7.38e+09 -1.74e+09 -1.74e+09 nan -1.912e+10 0.0871 -0.3217 nan nan -8.01e+09 1.471e+10 0.2835 0.044



  • Financial ratios and key metrics
  • Fundamentals(ticker, source, freq).ratios()

    • Returns a dataframe with annual or quarterly financial ratios up to 2005 from Macrotrends.com.
      • Class Arguments:
        • ticker: valid company ticker
        • source: choice has no effect, data is from Macrotrends.com
        • freq: 'A' (annual data), 'Q' (quarterly data), default: 'A'

    Example
    fd = Fundamentals('AAPL', freq = 'A')
    fd.ratios()
    
    current_ratio longterm_debt_to_capital debt_to_equity_ratio gross_margin operating_margin ebit_margin ebitda_margin pretax_profit_margin net_profit_margin asset_turnover inventory_turnover_ratio receiveable_turnover days_sales_in_receivables roe__return_on_equity return_on_tangible_equity roa__return_on_assets roi__return_on_investment book_value_per_share operating_cash_flow_per_share free_cash_flow_per_share
    date
    2005-09-30 2.9538 NaN NaN 29.0144 11.7938 11.7938 13.0787 12.9783 9.5327 1.2097 59.9333 15.5654 23.4495 17.8783 18.1124 11.5318 17.8783 0.3177 0.1057 0.0948
    2006-09-30 2.2519 NaN NaN 28.9827 12.7000 12.7000 13.8649 14.5897 10.2977 1.1226 50.8037 15.4273 23.6593 19.9219 20.2814 11.5606 19.9219 0.4169 0.0153 0.0312
    2007-09-30 2.3659 NaN NaN 33.1679 17.9307 17.9307 19.2611 20.3678 14.2200 0.9697 47.4740 15.0141 24.3106 24.0504 24.6214 13.7886 24.0504 0.5950 0.1293 0.1266
    2008-09-30 2.6411 NaN NaN 35.2005 22.2107 22.2107 23.5337 23.8644 16.3213 1.0365 47.7289 15.4794 23.5798 27.4432 28.0624 16.9169 27.4432 0.8964 0.1602 0.1465
    2009-09-30 2.7425 NaN NaN 40.1399 27.3628 27.3628 29.0735 28.1226 19.1936 0.9032 56.4462 8.4843 43.0207 26.0272 26.4052 17.3365 26.0272 1.2558 0.0201 0.0183


    Fundamentals(ticker, source, freq).key_metrics()

    • Returns a dataframe with current key statistics and financial ratios from either Yahoo Finance or Finviz. Default key metrics for the 'macrotrends' and 'marketwatch' source is from Finviz.
      • Class Arguments:
        • ticker: valid company ticker
        • source: 'yahoo', 'marketwatch', 'macrotrends', default: 'macrotrends'
        • freq: choice has no effect, most recent data is returned

    Default Example
    fd = Fundamentals('AAPL')
    fd.key_metrics()
    
    index market_cap income sales book_to_sh ..
    0 DJIA S&P500 1.94097e+12 5.842e+10 2.7386e+11 4.19 ...

    Yahoo Example
    fd = Fundamentals('AAPL', source = 'yahoo')
    fd.key_metrics()
    
    payout_ratio profit_margin operating_margin_(ttm) return_on_assets_(ttm) return_on_equity_(ttm) ...
    0 0.2373 0.2133 0.2452 0.1312 0.6925 ...


  • Earnings and revenue estimates
  • Fundamentals( ticker, source, freq ).earnings_estimates()

    • Returns current earnings estimates for the current quarter, next quarter, current year and the next year from Yahoo Finance.
      • Class Arguments:
        • ticker: valid company ticker
        • source: choice has no effect, data is from Yahoo Finance
        • freq: choice has no effect, most recent data is returned

    Example
    fd = Fundamentals('AAPL')
    fd.earnings_estimates('AAPL')
    
    date no_of_analysts avg_estimate low_estimate high_estimate year_ago_eps
    1 Current Qtr. (Sep 2020) 28 2.8 2.18 3.19 3.03
    2 Next Qtr. (Dec 2020) 24 5.45 4.76 6.82 4.99
    3 Current Year (2020) 35 12.97 12.36 13.52 11.89
    4 Next Year (2021) 35 15.52 12.67 18 12.97


    Fundamentals( ticker, source, freq ).earnings_estimate_trends()

    • Returns earnings estimates for the current quarter, next quarter, current year and the next year for the current date, 7 days ago, 30 days ago, 60 days ago and 90 days ago from Yahoo Finance.
      • Class Arguments:
        • ticker: valid company ticker
        • source: choice has no effect, data is from Yahoo Finance
        • freq: choice has no effect, most recent data is returned

    Example
    fd = Fundamentals('AAPL')
    fd.earnings_estimate_trends()
    
    date current_estimate 7_days_ago 30_days_ago 60_days_ago 90_days_ago
    1 Current Qtr. (Sep 2020) 2.8 2.84 2.79 2.82 2.8
    2 Next Qtr. (Dec 2020) 5.45 5.44 5.22 5.21 5.22
    3 Current Year (2020) 12.97 13 12.41 12.39 12.32
    4 Next Year (2021) 15.52 15.54 14.94 14.86 14.73


    Fundamentals( ticker, source, freq ).earnings_history()

    • Returns earnings estimates and actual earnings for the past 4 quarters from Yahoo Finance.
      • Class Arguments:
        • ticker: valid company ticker
        • source: choice has no effect, data is from Yahoo Finance
        • freq: choice has no effect, most recent data is returned

    Example
    fd = Fundamentals('AAPL')
    fd.earnings_history()
    
    date eps_est eps_actual difference surprise_%
    1 9/29/2019 2.84 3.03 0.19 0.067
    2 12/30/2019 4.55 4.99 0.44 0.097
    3 3/30/2020 2.26 2.55 0.29 0.128
    4 6/29/2020 2.04 2.58 0.54 0.265


    Fundamentals(ticker, source, freq).revenue_estimates()

    • Returns revenue estimates for the current quarter, next quarter, current year and the next year from Yahoo Finance.
      • Class Arguments:
        • ticker: valid company ticker
        • source: choice has no effect, data is from Yahoo Finance
        • freq: choice has no effect, most recent data is returned

    Example
    fd = Fundamentals('AAPL')
    fd.revenue_estimates()
    
    date no_of_analysts avg_estimate low_estimate high_estimate year_ago_sales sales_growth_(yearest)
    1 Current Qtr. (Sep 2020) 26 6.351e+10 5.255e+10 6.85e+10 6.404e+10 -0.008
    2 Next Qtr. (Dec 2020) 24 1.0036e+11 8.992e+10 1.157e+11 8.85e+10 0.134
    3 Current Year (2020) 33 2.7338e+11 2.6236e+11 2.8089e+11 2.6017e+11 0.051
    4 Next Year (2021) 33 3.0734e+11 2.7268e+11 3.3153e+11 2.7338e+11 0.124


    Fundamentals( ticker, source, freq ).growth_estimates()

    • Returns earnings estimates and actual earnings for the past 4 quarters from Yahoo Finance.
      • Class Arguments:
        • ticker: valid company ticker
        • source: choice has no effect, data is from Yahoo Finance
        • freq: choice has no effect, most recent data is returned

    Example
    fd = Fundamentals('AAPL')
    fd.growth_estimates()
    

    Output

    aapl industry sector(s) sandp_500
    Current_Qtr. -0.079 nan nan nan
    Next_Qtr. 0.088 nan nan nan
    Current_Year 0.088 nan nan nan
    Next_Year 0.195 nan nan nan
    Next_5_Years_(per_annum) 0.1246 nan nan nan
    Past_5_Years_(per_annum) 0.0842 nan nan nan



  • Earnings Call Transcripts
  • The earnings call transcripts are collected from The Motley Fool and are available until Q1 2018. The data returns a simple breakdown of the sections of the earnings call which will still need to be processed further. The full html of the call is also available.

    Fundamentals( ticker, source, freq ).transcripts(html = True)

    • Returns recent history (up to Q1 2018) of earnings call transcripts.
      • Function Arguments:
        • html = True returns additional columns with html of transcript from Motley Fool.
      • Class Arguments:
        • ticker: valid company ticker
        • source: choice has no effect, data is the Motley Fool
        • freq: choice has no effect

    Example
    fd = Fundamentals('AAPL')
    fd.transcripts(html = True)
    
    prepared_remarks questions_and_answers call_participants ticker html date time quarter link
    2020-07-31 Operator Good day, everyone. Welcome to the Apple Inc. third-quarter fiscal year 2020 earnings con ... Operator [Operator instructions] Luca Maestri -- Chief Financial Officer Operator, may we plea ... Tejas Gala -- Senior Manager, Corporate Finance, and Investor Relations Tim Cook -- Chief Executiv ... AAPL

    Prepared Remarks:

    Operator

    Good day, everyone. Welcome to the Ap ...

    2020/07/31 5:00 p.m. ET Q3 2020 https://www.fool.com/earnings/call-transcripts/2020/07/31/apple-aapl-q3-2020-earnings-call-transcrip ...
    2020-04-30 Operator Good day, everyone. Welcome to the Apple Inc. Second Quarter Fiscal Year 2020 Earnings Co ... Operator Yes. That will come from Shannon Cross, Cross Research. Shannon Cross -- Cross Research ... Tejas Gala -- Senior Manager, Corporate Finance and Investor Relations Tim Cook -- Chief Executive ... AAPL

    Prepared Remarks:

    Operator

    Good day, everyone. Welcome to the Ap ...

    2020/04/30 5:00 p.m. ET Q2 2020 https://www.fool.com/earnings/call-transcripts/2020/04/30/apple-inc-aapl-q2-2020-earnings-call-trans ...
    2020-01-28 Operator Good day everyone. Welcome to the Apple Incorporated First Quarter Fiscal Year 2020 Earni ... Operator Yes. That will be from Amit Daryanani with Evercore. Amit Daryanani -- Evercore ISI -- ... Tejas Gala -- Senior Analyst, Corporate Finance and Investor Relations Tim Cook -- Chief Executive ... AAPL

    Prepared Remarks:

    Operator

    Good day everyone. Welcome to the App ...

    2020/01/28 5:00 p.m. ET Q1 2020 https://www.fool.com/earnings/call-transcripts/2020/01/28/apple-inc-aapl-q1-2020-earnings-call-trans ...
    ... ... ... ... ... ... ... ... ... ...


  • Insider transactions and analyst ratings
  • Fundamentals( ticker, source, freq ).insider_transactions()

    • Returns company insider transactions for the past year from Finviz.
      • Class Arguments:
        • ticker: valid company ticker
        • source: choice has no effect, data is from Finviz
        • freq: choice has no effect, most recent data is returned

    Example
    fd = Fundamentals('AAPL')
    fd.insider_transactions()
    
    insider_trading relationship date transaction cost #shares value_($) #shares_total sec_form_4
    0 COOK TIMOTHY D Chief Executive Officer Aug 25 Sale 496.91 265160 131761779 837374 Aug 25 06:45 PM
    1 KONDO CHRIS Principal Accounting Officer May 08 Sale 305.62 4491 1372539 7370 May 12 06:30 PM
    2 JUNG ANDREA Director Apr 28 Option Exercise 48.95 9590 469389 33548 Apr 30 09:30 PM
    3 O'BRIEN DEIRDRE Senior Vice President Apr 16 Sale 285.12 9137 2605141 33972 Apr 17 06:31 PM
    4 Maestri Luca Senior Vice President, CFO Apr 07 Sale 264.44 41062 10858445 27568 Apr 09 06:30 PM
    ... ... ... ... ... ... ... ... ... ...


    Fundamentals( ticker, source, freq ).analyst_ratings()

    • Returns recent history of analyst ratings from Finviz.
      • Class Arguments:
        • ticker: valid company ticker
        • source: choice has no effect, data is from Finviz
        • freq: choice has no effect, most recent data is returned

    Example
    fd = Fundamentals('AAPL')
    fd.analyst_ratings()
    

    Output

    date action rating_institution rating price_target
    2020-09-01 00:00:00 Reiterated JP Morgan Overweight $115 → $150
    2020-09-01 00:00:00 Reiterated Cowen Outperform $530 → $133
    2020-08-31 00:00:00 Reiterated Monness Crespi & Hardt Buy $117.50 → $144
    2020-08-26 00:00:00 Reiterated Wedbush Outperform $515 → $600
    2020-08-25 00:00:00 Reiterated Cowen Outperform $470 → $530
    ... ... ... ... ...



  • ESG scores
  • Fundamentals( ticker, source, freq ).esg_score()

    • Returns current ESG scores from Sustainalytics published on Yahoo Finance.
      • Class Arguments:
        • ticker: valid company ticker
        • source: choice has no effect, data is from Yahoo Finance
        • freq: choice has no effect, most recent data is returned

    Example
    fd = Fundamentals('AAPL')
    fd.esg_score()
    
    date total_esg_risk_score risk_category risk_percentile environment_risk_score social_risk_score ...
    0 2020-08-25 24 Medium 33rd 0.5 13 ...


    Fundamentals( ticker, source, freq ).corporate_governance_score()

    • Returns current corporate governance scores from Institutional Shareholder Services (ISS) published on Yahoo Finance.
      • Class Arguments:
        • ticker: valid company ticker
        • source: choice has no effect, data is from Yahoo Finance
        • freq: choice has no effect, most recent data is returned

    Example
    fd = Fundamentals('AAPL')
    fd.corporate_governance_score()
    

    Output

    audit board shareholder_rights compensation quality_score ticker date
    0 1 1 1 3 1 AAPL 2020-08-25



  • Company info
  • Fundamentals( ticker, source, freq ).profile()

    • Returns company sector, industry, current number of employees and a company description.
      • Class Arguments:
        • ticker: valid company ticker
        • source: choice has no effect, data is from Yahoo Finance
        • freq: choice has no effect

    Example
    fd = Fundamentals('AAPL')
    fd.profile()
    
    company_name sector industry number_of_employees description ticker
    0 Apple Inc. Technology Consumer Electronics 137000 Apple Inc. designs, manufactures, and markets smartphones, personal computers, tablets, wearables, and accessories worldwide... AAPL


    Fundamentals( ticker, source, freq ).executives_info()

    • Returns current company executives with name, title, salary, age and their gender.
      • Class Arguments:
        • ticker: valid company ticker
        • source: choice has no effect, data is from Yahoo Finance
        • freq: choice has no effect

    Example
    fd = Fundamentals('AAPL')
    fd.executives_info()
    
    name title pay exercised year_born gender age_at_end_of_year
    0 Mr. Timothy D. Cook CEO & Director 1.156e+07 nan 1961 male 59
    1 Mr. Luca Maestri CFO & Sr. VP 3.58e+06 nan 1964 male 56
    2 Mr. Jeffrey E. Williams Chief Operating Officer 3.57e+06 nan 1964 male 56
    3 Ms. Katherine L. Adams Sr. VP, Gen. Counsel & Sec. 3.6e+06 nan 1964 female 56
    4 Ms. Deirdre O'Brien Sr. VP of People & Retail 2.69e+06 nan 1967 female 53



    Price data

    The functions below help to retrieve daily historical price data from Yahoo Finance as well as most recent option prices from Yahoo Finance or CBOE.

    Furthermore, the historical_futures_contracts function enables a bulk download of historical monthly futures contracts up to the year 2000 for currencies, indices, interest rates and commodities including energy, metals and agricultural contracts. The data is downloaded from www.mrci.com but the data is not completely cleaned (yet).

    import finpie.price_data
    
    # Historical price data from Yahoo Finance, most recent option prices from Yahoo Finance and CBOE, and futures prices bulk-download...
    # from finpie.price_data import price_data
    import finpie
    

  • Stock and ETF prices
  • historical_prices( ticker )

    • Returns dataframe with daily historical prices from Yahoo Finance.
    Example
    historical_prices('AAPL')
    
    Date Open High Low Close Adj Close Volume
    0 1993-01-29 43.9688 43.9688 43.75 43.9375 26.1841 1003200
    1 1993-02-01 43.9688 44.25 43.9688 44.25 26.3703 480500
    2 1993-02-02 44.2188 44.375 44.125 44.3438 26.4262 201300
    3 1993-02-03 44.4062 44.8438 44.375 44.8125 26.7055 529400
    4 1993-02-04 44.9688 45.0938 44.4688 45 26.8172 531500
    ... ... ... ... ... ... ... ...



  • Option prices
  • yahoo_option_chain( ticker )

    • Returns two dataframes for current put and call options from Yahoo Finance.
    Example
    calls, puts = yahoo_option_chain('AAPL')
    

    Call options chain

    contract_name last_trade_date strike last_price ...
    0 AAPL200828C00190000 2020-08-25 3:40PM EDT 190 310.29 ...
    1 AAPL200828C00195000 2020-08-25 12:36PM EDT 195 300.7 ...
    2 AAPL200828C00200000 2020-08-25 12:13PM EDT 200 294.8 ...
    3 AAPL200828C00205000 2020-08-06 3:07PM EDT 205 249.54 ...
    ... ... ... ... ... ...

    Put options chain

    contract_name last_trade_date strike last_price bid
    0 AAPL200828P00190000 2020-08-24 2:05PM EDT 190 0.01 ...
    1 AAPL200828P00195000 2020-08-10 10:38AM EDT 195 0.02 ...
    2 AAPL200828P00200000 2020-08-24 1:36PM EDT 200 0.01 ...
    3 AAPL200828P00205000 2020-08-24 10:08AM EDT 205 0.02 ...
    ... ... ... ... ... ...


    cboe_option_chain( ticker, head = False )

    • Returns two dataframes for current put and call options from CBOE.
    Example
    calls, puts = cboe_option_chain('AAPL')
    

    Call options chain

    expiration calls last_sale net bid ask vol iv delta gamma open_int strike underlying
    0 09/25/2020 AAPL200925C00058750 46.75 -2.375 50.1 52.65 15 0.02 1 0.0002 0 58.75 110.13
    1 09/25/2020 AAPL200925C00060000 49.2 1.325 48.85 51.4 33 0.02 1 0.0001 38 60 110.13
    2 09/25/2020 AAPL200925C00061250 49.3 0 47.6 50.2 0 0.02 1 0.0002 0 61.25 110.13
    3 09/25/2020 AAPL200925C00062500 43.1 -2.3 47.2 48.05 2 0.02 0.9989 0.0002 6 62.5 110.13
    ... ... ... ... ... ... ... ... ... ... ... ... ... ...

    Put options chain

    expiration puts last_sale net bid ask vol iv delta gamma open_int strike underlying
    0 09/25/2020 AAPL200925P00058750 0.06 0 0 0.01 0 2.001 -0.001 0.0001 76 58.75 110.13
    1 09/25/2020 AAPL200925P00060000 0.01 0 0 0.01 0 1.876 -0.0008 0.0001 505 60 110.13
    2 09/25/2020 AAPL200925P00061250 0.03 0 0 0.01 0 1.8406 -0.0009 0.0001 17 61.25 110.13
    3 09/25/2020 AAPL200925P00062500 0.01 -0.005 0 0.03 10 1.8178 -0.0011 0.0002 123 62.5 110.13
    ... ... ... ... ... ... ... ... ... ... ... ... ... ...

  • Futures prices
  • historical_futures_contracts( pandas.date_range )

    • Returns daily price data for a number of monthly future contracts including open interest of each contract for the given date range.
    Example
    historical_futures_contracts( pd.date_range('2020-01-01', '2020-09-01') )
    
    month date open high low close change volume open_interest change_in_oi future
    2020-01-06 Jan20 200106 296.2 299.4 296.2 297.7 1.6 4103 2459 -811 Soybean Meal(CBOT)
    2020-01-06 Mar20 200106 301.5 304.5 300.6 302.9 1.7 58930 222007 3,678 Soybean Meal(CBOT)
    2020-01-06 May20 200106 305.3 308.3 304.6 306.9 1.7 23500 92983 2,616 Soybean Meal(CBOT)
    ... ... ... ... ... ... ... ... ... ... ... ...


    futures_contracts( date )

    • Returns daily price data for a number of monthly future contracts including open interest of each contract for the given date.
    Example
    futures_prices('2020-01-06')
    
    month date open high low close change volume open_interest change_in_oi future
    2020-01-06 Jan20 200106 296.2 299.4 296.2 297.7 1.6 4103 2459 -811 Soybean Meal(CBOT)
    2020-01-06 Mar20 200106 301.5 304.5 300.6 302.9 1.7 58930 222007 3,678 Soybean Meal(CBOT)
    2020-01-06 May20 200106 305.3 308.3 304.6 306.9 1.7 23500 92983 2,616 Soybean Meal(CBOT)
    ... ... ... ... ... ... ... ... ... ... ... ...



    News data

    The functions below retrieve news headlines based on keyword searches from Barrons, CNBC, the Financial Times, the New York Times, Reuters, Seeking Alpha and the Wall Street Journal. The keyword for Seeking Alpha is simply the relevant stock ticker.

    The scrape is based on Selenium and may not be very stable if the website layouts change.

    Furthermore, some of the functions can run for a long-time so it is recommended to use a reasonable datestop value.

    Some downloads may fail occasionally as access to the website could be blocked.

    # Importing the NewsData class
    from finpie import NewsData #
    news = NewsData('XOM', 'exxon mobil')
    news.head = False # default = false, ensures selenium headless mode
    news.verbose = True # default = False, prints total number of collected articles
    


    NewsData(ticker, keywords).barrons()

    • Returns the news headlines from Barrons.com for the specified keywords.
    Example
    # retrieve news article for a given search term
    news = NewsData('XOM', 'exxon mobil')
    df = news.barrons(datestop = '2020-06-01')
    # filter news headlines with a keyword list
    news.filterz = [ 'exxon', 'mobil', 'oil', 'energy' ]
    df = news.filter_data(df)
    
    date link headline description newspaper author date_retrieved ticker comments tag search_term id source
    15/09/2020 https://www.barrons.com/articles/options-traders-are-pricing-in-an-exxon-dividend-cut-analyst-says-51600181938 Options Traders Are Pricing In an Exxon Dividend Cut, Analyst Says Whether Exxon can maintain its dividend is one of the most active debates right now among energy investors. The company has a strong incentive to keep making payments at current levels. Barrons.com Avi Salzman 2020-09-16 13:35:26.574289 XOM nan nan exxon mobil Barrons.comOptions Traders Are Pricing In an Exxon Dividend Cut, Analyst Sayshttps://www.barrons.com/articles/options-traders-are-pricing-in-an-exxon-dividend-cut-analyst-says-51600181938 barrons
    13/09/2020 https://www.wsj.com/articles/exxon-used-to-be-americas-most-valuable-company-what-happened-oil-gas-11600037243 Exxon Used to Be America’s Most Valuable Company. What Happened? The oil giant doubled down on oil and gas at what now looks to be the worst possible time. Investors are fleeing and workers are grumbling about the direction of a company some see as out of touch. WSJ.com Christopher M. Matthews 2020-09-16 13:35:26.574289 XOM nan nan exxon mobil WSJ.comExxon Used to Be America’s Most Valuable Company. What Happened?https://www.wsj.com/articles/exxon-used-to-be-americas-most-valuable-company-what-happened-oil-gas-11600037243 barrons
    11/09/2020 https://www.barrons.com/articles/where-to-find-bargains-in-oil-stocks-51599837910 Where to Find Bargains in Oil Stocks Now Goldman Sachs analyst likes certain refiners and Canadian oil companies. Barrons.com Avi Salzman 2020-09-16 13:35:26.574289 XOM nan nan exxon mobil Barrons.comWhere to Find Bargains in Oil Stocks Nowhttps://www.barrons.com/articles/where-to-find-bargains-in-oil-stocks-51599837910 barrons
    ... ... ... ... ... ... ... ... ... ... ... ... ...


    NewsData(ticker, keywords).cnbc()

    • Returns the news headlines from CNBC for the specified keywords.
    Example
    # retrieve news article for a given search term
    news = NewsData('XOM', 'exxon mobil')
    df = news.cnbc(datestop = '2020-06-01')
    # filter news headlines with a keyword list
    news.filterz = [ 'exxon', 'mobil', 'oil', 'energy' ]
    df = news.filter_data(df)
    
    date link headline description tag author date_retrieved ticker comments newspaper search_term id source
    2020-09-10 00:00:00 https://www.cnbc.com/video/2020/09/10/honeywell-ceo-darius-adamczyk-on-rejoining-the-dow.html?&qsearchterm=exxon mobil Honeywell CEO Darius Adamczyk on rejoining the Dow S&P Dow Jones Indices said Monday that three new companies will be joining the 30-stock benchmark. Salesforce.com will replace Exxon Mobil, Amgen will replace Pfizer ... Squawk Box U.S. nan 2020-09-16 14:14:43.533664 XOM nan CNBC exxon mobil CNBCHoneywell CEO Darius Adamczyk on rejoining the Dowhttps://www.cnbc.com/video/2020/09/10/honeywell-ceo-darius-adamczyk-on-rejoining-the-dow.html?&qsearchterm=exxon mobil cnbc
    2020-09-09 00:00:00 https://www.cnbc.com/2020/09/09/options-market-predicts-exxon-mobils-dividend-could-be-in-danger.html?&qsearchterm=exxon mobil Options market predicts Exxon Mobil’s dividend could be in danger One of the most consistent dividend payers in the history of the energy trade could be in danger of having to slash its payout, according ... Options Action Tyler Bailey 2020-09-16 14:14:43.533664 XOM nan CNBC exxon mobil CNBCOptions market predicts Exxon Mobil’s dividend could be in dangerhttps://www.cnbc.com/2020/09/09/options-market-predicts-exxon-mobils-dividend-could-be-in-danger.html?&qsearchterm=exxon mobil cnbc
    2020-09-08 00:00:00 https://www.cnbc.com/2020/09/08/exxon-downsizes-global-empire-as-wall-street-worries-about-dividend.html?&qsearchterm=exxon mobil Exxon downsizes global empire as Wall Street worries about dividend Ill-timed bets on rising demand have Exxon Mobil facing a shortfall of about $48 billion through 2021, according to a Reuters tally and Wall Street ... Oil and Gas nan 2020-09-16 14:14:43.533664 XOM nan CNBC exxon mobil CNBCExxon downsizes global empire as Wall Street worries about dividendhttps://www.cnbc.com/2020/09/08/exxon-downsizes-global-empire-as-wall-street-worries-about-dividend.html?&qsearchterm=exxon mobil cnbc
    ... ... ... ... ... ... ... ... ... ... ... ... ...


    NewsData(ticker, keywords).ft()

    • Returns the news headlines from the Financial Times for the specified keywords.
    Example
    # retrieve news article for a given search term
    news = NewsData('XOM', 'exxon mobil')
    df = news.ft(datestop = '2020-06-01')
    # filter news headlines with a keyword list
    news.filterz = [ 'exxon', 'mobil', 'oil', 'energy' ]
    df = news.filter_data(df)
    
    date link headline description tag date_retrieved ticker comments author newspaper search_term id source
    2020-07-31 00:00:00 /content/64d7e86e-079c-4502-a9a4-5ab7439c732f Big Oil gets smaller as Chevron and Exxon losses mount to $9.4bn ...destruction in the second quarter was unprecedented in the history of modern oil markets,” Neil Chapman, Exxon senior vice-president, told analysts on an investor call. “To put it in context, absolute... Oil & Gas industry 2020-09-16 14:20:31.865540 XOM nan nan FT exxon mobil FTBig Oil gets smaller as Chevron and Exxon losses mount to $9.4bn/content/64d7e86e-079c-4502-a9a4-5ab7439c732f ft
    2020-05-27 00:00:00 /content/c43ead81-5af3-44de-af1e-b108d6491354 Exxon shareholders vote against splitting chair and CEO roles ...Exxon, said the appointment of a lead director had helped improve oversight. A separate resolution calling for increased transparency about Exxon’s lobbying activity won 37.5 per cent support, a... Oil & Gas industry 2020-09-16 14:20:31.865540 XOM nan nan FT exxon mobil FTExxon shareholders vote against splitting chair and CEO roles/content/c43ead81-5af3-44de-af1e-b108d6491354 ft
    2020-05-12 00:00:00 /content/c54ee229-f4e7-43c8-87a5-e383099542fb Big Exxon shareholder to vote against chief ...company to disclose its lobbying activities, arguing it was falling behind global peers by failing to act on climate change. Wednesday’s move by LGIM, whose roughly $1bn stake makes it a top-20 Exxon... Corporate governance 2020-09-16 14:20:31.865540 XOM nan nan FT exxon mobil FTBig Exxon shareholder to vote against chief/content/c54ee229-f4e7-43c8-87a5-e383099542fb ft
    ... ... ... ... ... ... ... ... ... ... ... ... ...


    NewsData(ticker, keywords).nyt()

    • Returns the news headlines from the New York Times for the specified keywords.
    Example
    # retrieve news article for a given search term
    news = NewsData('XOM', 'exxon mobil')
    df = news.nyt(datestop = '2020-06-01')
    # filter news headlines with a keyword list
    news.filterz = [ 'exxon', 'mobil', 'oil', 'energy' ]
    df = news.filter_data(df)
    
    date link headline description tag author comments date_retrieved ticker newspaper search_term id source
    2020-09-08 00:00:00 /aponline/2020/09/08/business/ap-financial-markets-stocks.html?searchResultPosition=2 Exxon, Tesla Fall; Nikola, Beyond Meat Rise Stocks that moved heavily or traded substantially Tuesday: Business The Associated Press nan 2020-09-16 14:22:13.032245 XOM NYT exxon mobil NYTExxon, Tesla Fall; Nikola, Beyond Meat Rise/aponline/2020/09/08/business/ap-financial-markets-stocks.html?searchResultPosition=2 nyt
    2020-09-08 00:00:00 /reuters/2020/09/08/business/08reuters-exxon-mobil-spending-exclusive.html?searchResultPosition=3 Exclusive: Exxon Downsizes Global Empire as Wall Street Worries About Dividend Ill-timed bets on rising demand have Exxon Mobil Corp facing a shortfall of about $48 billion through 2021, according to a Reuters tally and Wall Street estimates, a situation that will require the top U.S. oil company to make deep cuts to its staff and projects. Business Reuters nan 2020-09-16 14:22:13.032245 XOM NYT exxon mobil NYTExclusive: Exxon Downsizes Global Empire as Wall Street Worries About Dividend/reuters/2020/09/08/business/08reuters-exxon-mobil-spending-exclusive.html?searchResultPosition=3 nyt
    2020-09-03 00:00:00 /reuters/2020/09/03/business/03reuters-refinery-operations-exxon-beaumont.html?searchResultPosition=4 Exxon Beaumont, Texas, Refinery Restarts Large Crude Unit: Sources Exxon Mobil Corp restarted the large crude distillation unit (CDU) at its 369,024 barrel-per-day (bpd) Beaumont, Texas, refinery on Thursday, said sources familiar with plant operations. Business Reuters nan 2020-09-16 14:22:13.032245 XOM NYT exxon mobil NYTExxon Beaumont, Texas, Refinery Restarts Large Crude Unit: Sources/reuters/2020/09/03/business/03reuters-refinery-operations-exxon-beaumont.html?searchResultPosition=4 nyt
    ... ... ... ... ... ... ... ... ... ... ... ... ...


    NewsData(ticker, keywords).seeking_alpha(datestop, press_releases = False)

    • Returns the news headlines from Seeking Alpha for the specified keywords.
    • It can happen that access to SeekingAlpha requires to solve a captcha by pressing and holding a button when run for the first time in a program. Will try to fix this in future versions. press_releases = True will get press releases instead of news headlines.
    Example
    # retrieve news article for a given search term
    news = NewsData('XOM', 'exxon mobil')
    df = news.seeking_alpha(datestop = '2020-06-01')
    # filter news headlines with a keyword list
    news.filterz = [ 'exxon', 'mobil', 'oil', 'energy' ]
    df = news.filter_data(df)
    
    date link headline author comments date_retrieved ticker description tag newspaper search_term id source
    2020-09-15 00:00:00 /news/3614409-options-traders-pricing-in-exxon-dividend-cut-analyst-says?source=content_type:react|section:News|sectionAsset:News|first_level_url:symbol|button:Author|lock_status:No|line:1 Options traders pricing in Exxon dividend cut, analyst says SA News 0 comments 2020-09-16 15:14:23.575898 XOM nan nan SA - News exxon mobil SA - NewsOptions traders pricing in Exxon dividend cut, analyst says/news/3614409-options-traders-pricing-in-exxon-dividend-cut-analyst-says?source=content_type:react|section:News|sectionAsset:News|first_level_url:symbol|button:Author|lock_status:No|line:1 sa
    2020-09-14 00:00:00 /news/3613801-connecticut-latest-state-to-sue-exxon-over-climate-change?source=content_type:react|section:News|sectionAsset:News|first_level_url:symbol|button:Author|lock_status:No|line:2 Connecticut latest state to sue Exxon over climate change SA News 0 comments 2020-09-16 15:14:23.575898 XOM nan nan SA - News exxon mobil SA - NewsConnecticut latest state to sue Exxon over climate change/news/3613801-connecticut-latest-state-to-sue-exxon-over-climate-change?source=content_type:react|section:News|sectionAsset:News|first_level_url:symbol|button:Author|lock_status:No|line:2 sa
    2020-09-10 00:00:00 /news/3612953-exxon-rated-new-buy-mkm-shares-slip?source=content_type:react|section:News|sectionAsset:News|first_level_url:symbol|button:Author|lock_status:No|line:3 Exxon rated new Buy at MKM but shares slip SA News 0 comments 2020-09-16 15:14:23.575898 XOM nan nan SA - News exxon mobil SA - NewsExxon rated new Buy at MKM but shares slip/news/3612953-exxon-rated-new-buy-mkm-shares-slip?source=content_type:react section:News
    ... ... ... ... ... ... ... ... ... ... ... ... ...


    NewsData(ticker, keywords).wsj()

    • Returns the news headlines from the Wall Street Journal for the specified keywords.
    Example
    # retrieve news article for a given search term
    news = NewsData('XOM', 'exxon mobil')
    df = news.wsj(datestop = '2020-06-01')
    # filter news headlines with a keyword list
    news.filterz = [ 'exxon', 'mobil', 'oil', 'energy' ]
    df = news.filter_data(df)
    
    date link headline description author tag date_retrieved ticker newspaper search_term id comments source
    2020-09-13 00:00:00 /articles/exxon-used-to-be-americas-most-valuable-company-what-happened-oil-gas-11600037243?mod=searchresults&page=1&pos=1 Exxon Used to Be America’s Most Valuable Company. What Happened? The oil giant doubled down on oil and gas at what now looks to be the worst possible time. Investors are fleeing and workers are grumbling about the direction of a company some see as out of touch. Christopher M. Matthews Business 2020-09-16 15:19:39.733511 XOM WSJ exxon mobil WSJExxon Used to Be America’s Most Valuable Company. What Happened?/articles/exxon-used-to-be-americas-most-valuable-company-what-happened-oil-gas-11600037243?mod=searchresults&page=1&pos=1 nan wsj
    2020-09-10 00:00:00 /articles/oil-major-bp-gives-a-taste-of-how-it-will-go-green-11599745648?mod=searchresults&page=1&pos=2 Oil Major BP Gives a Taste of How It Will Go Green A deal to buy into wind farms off the coast of New York and Massachusetts showcases the British company’s ambitions in the clean-energy sector—and the risks it is taking. Rochelle Toplensky Heard on the Street 2020-09-16 15:19:39.733511 XOM WSJ exxon mobil WSJOil Major BP Gives a Taste of How It Will Go Green/articles/oil-major-bp-gives-a-taste-of-how-it-will-go-green-11599745648?mod=searchresults&page=1&pos=2 nan wsj
    2020-09-08 00:00:00 /articles/oil-prices-drop-on-faltering-recovery-in-demand-11599562101?mod=searchresults&page=1&pos=3 Oil Prices Tumble on Faltering Recovery in Demand Oil prices slumped to their lowest level in nearly three months, under pressure from a stalling recovery in demand and planned production expansions by OPEC that threaten to add to an existing glut of crude. Joe Wallace Oil Markets 2020-09-16 15:19:39.733511 XOM WSJ exxon mobil WSJOil Prices Tumble on Faltering Recovery in Demand/articles/oil-prices-drop-on-faltering-recovery-in-demand-11599562101?mod=searchresults&page=1&pos=3 nan wsj
    ... ... ... ... ... ... ... ... ... ... ... ... ...


    Other data

    nasdaq_tickers()

    • Returns dataframe of tickers traded on the Nasdaq exchange.
    Example
    nasdaq_tickers()
    
    Symbol Security Name
    0 AACG ATA Creativity Global - American Depositary Shares, each representing two common shares
    1 AACQ Artius Acquisition Inc. - Class A Common Stock
    2 AACQU Artius Acquisition Inc. - Unit consisting of one ordinary share and one third redeemable warrant
    3 AACQW Artius Acquisition Inc. - Warrant
    4 AAL American Airlines Group, Inc. - Common Stock
    ... ... ...


    global_tickers()

    • Returns 100.000+ global tickers from Gurufocus.com. Note that companies are listed in different countries or exchanges with different ticker symbols.
    Example
    global_tickers()
    
    Symbol Company
    0 QNCO.Israel (Y.Z) Queenco Ltd
    1 ONE.Canada 01 Communique Laboratory Inc
    2 DFK.Germany 01 Communique Laboratory Inc
    3 OCQLF 01 Communique Laboratory Inc
    4 01C.Poland 01Cyberaton SA
    5 1PG.Australia 1 Page Ltd
    6 I8Y.Germany 1 Page Ltd
    8 8458.Taiwan 1 Production Film Co
    9 DRI.Austria 1&1 Drillisch AG
    10 DRI.Switzerland 1&1 Drillisch AG
    ... ... ...




    cftc( report_type = 'futures_traders', year = 2000 )

    • Returns the CFTC reports for the given report type and period. Information on the data can be found here.
    • report_type options:
      • 'disaggregated_futures': Disaggregated Futures Only Reports
      • 'disaggregated_combined': Disaggregated Futures-and-Options Combined Reports
      • 'futures_traders' (default): Traders in Financial Futures ; Futures Only Reports
      • 'futures_traders_combined': Traders in Financial Futures ; Futures-and-Options Combined Reports
      • 'futures': Futures Only Reports
      • 'futures_combined': Futures-and-Options Combined Reports
      • 'commodity_index': Commodity Index Trader Supplement
    • If the year parameter is smaller than 2016, all available data will be returned.
    Example
    cftc(report_type = 'futures', year = 2020)
    
    market_and_exchange_names cftc_contract_market_code cftc_market_code_in_initials cftc_region_code cftc_commodity_code open_interest_(all) noncommercial_positions-long_(all) noncommercial_positions-short_(all) noncommercial_positions-spreading_(all) commercial_positions-long_(all) commercial_positions-short_(all) _total_reportable_positions-long_(all) total_reportable_positions-short_(all) nonreportable_positions-long_(all) nonreportable_positions-short_(all) open_interest_(old) noncommercial_positions-long_(old) noncommercial_positions-short_(old) noncommercial_positions-spreading_(old) commercial_positions-long_(old) commercial_positions-short_(old) total_reportable_positions-long_(old) total_reportable_positions-short_(old) nonreportable_positions-long_(old) nonreportable_positions-short_(old) open_interest_(other) noncommercial_positions-long_(other) noncommercial_positions-short_(other) noncommercial_positions-spreading_(other) commercial_positions-long_(other) commercial_positions-short_(other) total_reportable_positions-long_(other) total_reportable_positions-short_(other) nonreportable_positions-long_(other) nonreportable_positions-short_(other) change_in_open_interest_(all) change_in_noncommercial-long_(all) change_in_noncommercial-short_(all) change_in_noncommercial-spreading_(all) change_in_commercial-long_(all) change_in_commercial-short_(all) change_in_total_reportable-long_(all) change_in_total_reportable-short_(all) change_in_nonreportable-long_(all) change_in_nonreportable-short_(all) %_of_open_interest_(oi)_(all) %_of_oi-noncommercial-long_(all) %_of_oi-noncommercial-short_(all) %_of_oi-noncommercial-spreading_(all) %_of_oi-commercial-long_(all) %_of_oi-commercial-short_(all) %_of_oi-total_reportable-long_(all) %_of_oi-total_reportable-short_(all) %_of_oi-nonreportable-long_(all) %_of_oi-nonreportable-short_(all) %_of_open_interest_(oi)(old) %_of_oi-noncommercial-long_(old) %_of_oi-noncommercial-short_(old) %_of_oi-noncommercial-spreading_(old) %_of_oi-commercial-long_(old) %_of_oi-commercial-short_(old) %_of_oi-total_reportable-long_(old) %_of_oi-total_reportable-short_(old) %_of_oi-nonreportable-long_(old) %_of_oi-nonreportable-short_(old) %_of_open_interest_(oi)_(other) %_of_oi-noncommercial-long_(other) %_of_oi-noncommercial-short_(other) %_of_oi-noncommercial-spreading_(other) %_of_oi-commercial-long_(other) %_of_oi-commercial-short_(other) %_of_oi-total_reportable-long_(other) %_of_oi-total_reportable-short_(other) %_of_oi-nonreportable-long_(other) %_of_oi-nonreportable-short_(other) traders-total_(all) traders-noncommercial-long_(all) traders-noncommercial-short_(all) traders-noncommercial-spreading_(all) traders-commercial-long_(all) traders-commercial-short_(all) traders-total_reportable-long_(all) traders-total_reportable-short_(all) traders-total_(old) traders-noncommercial-long_(old) traders-noncommercial-short_(old) traders-noncommercial-spreading_(old) traders-commercial-long_(old) traders-commercial-short_(old) traders-total_reportable-long_(old) traders-total_reportable-short_(old) traders-total_(other) traders-noncommercial-long_(other) traders-noncommercial-short_(other) traders-noncommercial-spreading_(other) traders-commercial-long_(other) traders-commercial-short_(other) traders-total_reportable-long_(other) traders-total_reportable-short_(other) concentration-gross_lt_=_4_tdr-long_(all) concentration-gross_lt_=4_tdr-short_(all) concentration-gross_lt_=8_tdr-long_(all) concentration-gross_lt_=8_tdr-short_(all) concentration-net_lt_=4_tdr-long_(all) concentration-net_lt_=4_tdr-short_(all) concentration-net_lt_=8_tdr-long_(all) concentration-net_lt_=8_tdr-short_(all) concentration-gross_lt_=4_tdr-long_(old) concentration-gross_lt_=4_tdr-short_(old) concentration-gross_lt_=8_tdr-long_(old) concentration-gross_lt_=8_tdr-short_(old) concentration-net_lt_=4_tdr-long_(old) concentration-net_lt_=4_tdr-short_(old) concentration-net_lt_=8_tdr-long_(old) concentration-net_lt_=8_tdr-short_(old) concentration-gross_lt_=4_tdr-long_(other) concentration-gross_lt_=4_tdr-short(other) concentration-gross_lt_=8_tdr-long_(other) concentration-gross_lt_=8_tdr-short(other) concentration-net_lt_=4_tdr-long_(other) concentration-net_lt_=4_tdr-short_(other) concentration-net_lt_=8_tdr-long_(other) concentration-net_lt_=8_tdr-short_(other) contract_units cftc_contract_market_code_(quotes) cftc_market_code_in_initials_(quotes) cftc_commodity_code_(quotes)
    date
    2020-11-17 WHEAT-SRW - CHICAGO BOARD OF TRADE 001602 CBT 0 1 432714 127007 108586 108258 162186 168899 397451 385743 35263 46971 290010 100877 91806 55396 107265 114199 263538 261401 26472 28609 142704 49751 40401 29241 54921 54700 133913 124342 8791 18362 -8804 -14010 1027 6421 -1417 -14619 -9006 -7171 202 -1633 100 29.4 25.1 25 37.5 39 91.9 89.1 8.1 10.9 100 34.8 31.7 19.1 37 39.4 90.9 90.1 9.1 9.9 100 34.9 28.3 20.5 38.5 38.3 93.8 87.1 6.2 12.9 392 113 120 114 83 127 268 301 373 106 121 89 73 122 233 281 223 54 55 39 49 87 128 161 16.8 12.4 25.5 19.5 14.1 8.2 21.6 13.4 15.9 9.2 25.9 17.1 15.4 8 25.1 14.9 24.4 27.7 36.3 37.9 17.3 16.3 26.4 23.8 (CONTRACTS OF 5,000 BUSHELS) 001602 CBT 1
    2020-11-10 WHEAT-SRW - CHICAGO BOARD OF TRADE 001602 CBT 0 1 441518 141017 107559 101837 163603 183518 406457 392914 35061 48604 309149 117977 91684 53973 110678 132654 282628 278311 26521 30838 132369 45187 38022 25717 52925 50864 123829 114603 8540 17766 -17695 -3704 4074 -3266 -11418 -16834 -18388 -16026 693 -1669 10000 3109 2404 2301 3701 4106 9201 8900 709 1100 10000 3802 2907 1705 3508 4209 9104 9000 806 1000 10000 3401 2807 1904 4000 3804 9305 8606 605 1304 389 120 106 108 87 127 273 286 373 111 111 86 77 121 239 270 220 52 52 35 49 88 125 155 1605 1301 2504 2008 1308 900 2106 1405 1500 1000 2504 1802 1405 809 2406 1600 2508 2709 3805 3808 1709 1601 2706 2404 (CONTRACTS OF 5,000 BUSHELS) 001602 CBT 1
    2020-11-03 WHEAT-SRW - CHICAGO BOARD OF TRADE 001602 CBT 0 1 459213 144721 103485 105103 175021 200352 424845 408940 34368 50273 335930 124897 93364 58310 126302 151768 309509 303442 26421 32488 123283 43831 34128 22786 48719 48584 115336 105498 7947 17785 1309 -6915 -4209 -2235 11389 7396 2239 952 -930 357 100 31.5 22.5 22.9 38.1 43.6 92.5 89.1 7.5 10.9 100 37.2 27.8 17.4 37.6 45.2 92.1 90.3 7.9 9.7 100 35.6 27.7 18.5 39.5 39.4 93.6 85.6 6.4 14.4 393 119 108 106 91 130 275 290 382 111 114 88 76 122 243 274 204 46 47 31 51 84 116 146 15.7 13.7 24.5 21.7 12.4 8.7 20.2 14.6 14.5 11.9 24.3 19.6 12.9 9.4 22.4 16.3 25.8 28.7 38.9 39.2 17.1 16.7 27.5 24.4 (CONTRACTS OF 5,000 BUSHELS) 001602 CBT 1
    2020-10-27 WHEAT-SRW - CHICAGO BOARD OF TRADE 001602 CBT 0 1 457904 151636 107694 107338 163632 192956 422606 407988 35298 49916 340631 132614 101843 60118 120105 145840 312837 307801 27794 32830 117273 45561 32390 20681 43527 47116 109769 100187 7504 17086 13223 2593 5188 788 7089 7666 10470 13642 2753 -419 100 33.1 23.5 23.4 35.7 42.1 92.3 89.1 7.7 10.9 100 38.9 29.9 17.6 35.3 42.8 91.8 90.4 8.2 9.6 100 38.9 27.6 17.6 37.1 40.2 93.6 85.4 6.4 14.6 402 129 115 106 82 125 271 294 388 119 120 88 68 118 240 276 206 49 48 29 49 82 112 149 14.8 13.2 23.8 21.4 11.8 8.9 19.9 15.6 14.3 11.6 23.9 20.5 13.2 10.1 22.3 16.9 25.6 29.2 38.6 39 16.9 18.2 28.2 25.7 (CONTRACTS OF 5,000 BUSHELS) 001602 CBT 1
    2020-10-20 WHEAT-SRW - CHICAGO BOARD OF TRADE 001602 CBT 0 1 444681 149043 102506 106550 156543 185290 412136 394346 32545 50335 334451 132530 99016 60133 116411 141422 309074 300571 25377 33880 110230 43092 30069 19838 40132 43868 103062 93775 7168 16455 28174 13140 9401 1205 11140 14955 25485 25561 2689 2613 100 33.5 23.1 24 35.2 41.7 92.7 88.7 7.3 11.3 100 39.6 29.6 18 34.8 42.3 92.4 89.9 7.6 10.1 100 39.1 27.3 18 36.4 39.8 93.5 85.1 6.5 14.9 390 122 109 105 79 126 261 291 379 117 113 84 69 121 232 275 200 49 42 29 46 83 108 145 14.9 13.5 24.2 21.1 11.7 9.4 20 15.9 14.3 10.9 24.7 19.1 13.4 9.9 22.3 17.3 27.4 30.6 39.7 40.8 18 18.9 27.9 27.1 (CONTRACTS OF 5,000 BUSHELS) 001602 CBT 1
    2020-10-13 ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...



    Sources

  • Barrons, www.barrons.com
  • CBOE, www.cboe.com
  • CFTC, www.cftc.gov
  • CNBC, www.cnbc.com
  • Financial Times, www.ft.com
  • Finviz, www.finviz.com
  • Gurufocus, www.gurufocus.com
  • Investing.com, www.investing.com
  • MarketWatch, www.marketwatch.com
  • Macrotrends, www.macrotrends.net
  • Moore Research Center, www.mrci.com
  • Motley Fool, www.fool.com
  • NASDAQ, www.nasdaq.com
  • Seeking Alpha, www.seekingalpha.com
  • Wall Street Journal, www.wsj.com
  • Yahoo Finance, www.finance.yahoo.com


  • License

    Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

    Copyright (c) 2020 Peter la Cour

    Open Source Agenda is not affiliated with "Finpie" Project. README Source: peterlacour/finpie

    Open Source Agenda Badge

    Open Source Agenda Rating