Welcome to the Forum

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

Share Price on Income Statement (ttm) is NaN on non-trading quarter end date

It looks like I am getting a NaN value for share price on the Income Statement when the quarter end date is not a trading day. Any advice on how I can get the share price closest to the quarter end date?


  • Hi, I presume when using the Python API? Could you share some piece of your code?
  • First of all, let me apologize for asking an incomplete question. I am new to SimFin and to the forum. My Python code "Problem Example.ipynb" is on github at

    In reviewing my code this morning, I see that I was joining the ttm data from the Income Statement and Cash Flow Statement with the Daily Share Price data to produce a new dataframe which included items from all three. The IS and CF data are indexed on the quarter end date, but not all quarter ends are trading days, so my code was not finding a matching date to join a share price. So I think my question is how to find the share price "closest" to the quarter end date.
  • I think I figured out how to do this based on this youtube video at 36:59

    The trick is to create a new df of stock prices based on quarter end dates:
    #create a df of share prices at quarter end
    prices = sf.resample(df=share_price_df, rule='Q', method='ffill')
  • great to hear!
This discussion has been closed.