Welcome to the Forum

Creating an account is currently only possible via registration at SimFin.

I fail the tutorial

edited February 23 in Help/Support
I fail the tutorial.
I require a bulk download. But only the last of the month and not single days.
So I went through the various available tutorials to use the Python stuff to download the data.
But I always end stuck at "import" was not found or some "can not access" errors.

Is there any up-to-date step-by-step tutorial that works for Win10 and is noob-friendly?

At the moment I just use the Bulk download CSV and then I use power query of Excel to handle the data.

Comments

  • Here's a way to extract just month end dates for daily data:

    import pandas as pd
    from pd.tseries.offsets import MonthEnd
    import simfin as sf
    sf.set_api_key('your api key here')
    sf.set_data_dir('~/simfin_data/')

    #All share prices in SimFin data set, daily
    df = sf.load_shareprices(variant='daily', market='us').reset_index()

    #Create a column that is the month end for each day.
    #E.g. if Date = 2020-01-01, then Month End = 2020-01-31
    df['Month End'] = df['Date'] + MonthEnd(0)

    #Filter data for where a date is the month end of the date
    df = df[df['Date'] == df['Month End']]
    df.head()
  • If you are stuck at the import there is probably something wrong with your Python configuration.
    A step by step (noob friendly) guide on how to get the basics running can be found here:
    https://simfin-official.medium.com/a-next-generation-api-for-financial-data-5eaf87c991c7
Sign In to comment.