calculating n month returns over pandas timeseries of daily values

I have the following function to calculate n day returns:

def get_SPXR_daily(n, start_date = '1900-1-31', end_date = 'today'):
    start_date = pd.to_datetime(start_date, yearfirst=True)
    end_date = pd.to_datetime(end_date, yearfirst=True)
    if(start_date > end_date):
        print("Invalid date range provided")
        return 1
    filename = 'Bloomberg Raw Data.xlsx'
    s = 'SPXR_{}M'.format(n)
    df = pd.read_excel(filename, sheet_name='SPX', header=0, names=['date', 'SPX'])
    df[s] = (df['SPX'].shift(n)-df['SPX'])/df['SPX']
    df['date'] = pd.to_datetime(df['date'], yearfirst=True)
    df = df.set_index(['date'])
    return df.loc[start_date:end_date]

Which outputs the following when called on my desired date range:

                SPX
date               
1990-06-08   358.71
1990-06-11   361.63
1990-06-12   366.25
1990-06-13   364.90
1990-06-14   362.90
1990-06-15   362.91
1990-06-18   356.88
1990-06-19   358.47
1990-06-20   359.10
1990-06-21   360.47
1990-06-22   355.43
1990-06-25   352.31
1990-06-26   352.06
1990-06-27   355.14
1990-06-28   357.63
1990-06-29   358.02
1990-07-02   359.54
1990-07-03   360.16
1990-07-05   355.68
1990-07-06   358.42
1990-07-09   359.52
1990-07-10   356.49
1990-07-11   361.23
1990-07-12   365.44
1990-07-13   367.31
1990-07-16   368.95
1990-07-17   367.52
1990-07-18   364.22
1990-07-19   365.32
1990-07-20   361.61
...             ...
2015-03-23  2104.42
2015-03-24  2091.50
2015-03-25  2061.05
2015-03-26  2056.15
2015-03-27  2061.02
2015-03-30  2086.24
2015-03-31  2067.89
2015-04-01  2059.69
2015-04-02  2066.96
2015-04-06  2080.62
2015-04-07  2076.33
2015-04-08  2081.90
2015-04-09  2091.18
2015-04-10  2102.06
2015-04-13  2092.43
2015-04-14  2095.84
2015-04-15  2106.63
2015-04-16  2104.99
2015-04-17  2081.18
2015-04-20  2100.40
2015-04-21  2097.29
2015-04-22  2107.96
2015-04-23  2112.93
2015-04-24  2117.69
2015-04-27  2108.92
2015-04-28  2114.76
2015-04-29  2106.85
2015-04-30  2085.51
2015-05-01  2108.29
2015-05-04  2114.49

These are the closing prices on the S&P500. I want to compute the 1 month returns on a daily basis, meaning for every day I need to look for the closing price 1 month ahead. An unprecise way of doing this is:

df[s] = (df['SPX'].shift(n*-22)-df['SPX'])/df['SPX']

Where 22 is the average amount of business days per month. Is there an efficient way to directly grab the correct # of business days to calculate a daily, 1 month forward looking return? Is it possible just to offset the time by 1 business month when dealing with a span of days?