In [4]:
import quandl;
import pandas as pd;

import pickle;

import matplotlib.pyplot as plt;
from matplotlib import style;
style.use("ggplot");

In [5]:
api_key = open("quandlapikey.txt", "r").read();

def mortgage_30y_resampled():
    df = quandl.get("FMAC/MORTG", trim_start = "1975-01-01", authtoken = api_key);       
    df["Value"] = (df["Value"] - df["Value"][0]) / df["Value"][0] * 100.0;
    df.columns = ["M30"];
    return df.resample("M").mean();

def state_list():
    fiddy_states = pd.read_html("https://simple.wikipedia.org/wiki/List_of_U.S._states");
    return fiddy_states[0][0][1:];

def grap_initial_state_data_start_pct():
    states = state_list();
    main_df = pd.DataFrame();
    for ab in states:
        querry = "FMAC/HPI_" + ab;
        df = quandl.get(querry, authtoken = api_key);
        df.columns = [ab];        
        df[ab] = (df[ab] - df[ab][0]) / df[ab][0] * 100.0; # <-------
        if main_df.empty:
            main_df = df;
        else:
            main_df = main_df.join(df);

    pickle_out = open("./data/fiddy_states.pickle", "wb");
    pickle.dump(main_df, pickle_out);
    pickle_out.close();
    
def HPI_Benchmark():
    df = quandl.get("FMAC/HPI_USA", authtoken = api_key);
    df.columns = ["US"];        
    df["US"] = (df["US"] - df["US"][0]) / df["US"][0] * 100.0; # <-------
    return df;

In [21]:
def sp500_data():
    df = quandl.get("YAHOO/INDEX_GSPC", trim_start = "1975-01-01", authtoken = api_key);
    df["Adjusted Close"] = (df["Adjusted Close"] - df["Adjusted Close"][0]) / df["Adjusted Close"][0] * 100.0; # <-------
    df = df.resample("M").mean();
    df.rename(columns={"Adjusted Close":"sp500"}, inplace = True);
    df = df["sp500"];
    return df;

In [22]:
df = sp500_data();
print(df.head());


Date
1975-01-31     3.323491
1975-02-28    14.049322
1975-03-31    19.367785
1975-04-30    20.636734
1975-05-31    28.287322
Freq: M, Name: sp500, dtype: float64

In [23]:
def gdp_data():
    df = quandl.get("BCB/4385", trim_start = "1975-01-01", authtoken = api_key);
    df["Value"] = (df["Value"] - df["Value"][0]) / df["Value"][0] * 100.0; # <-------
    df = df.resample("M").mean();
    df.rename(columns={"Value":"GDP"}, inplace = True);
    df = df["GDP"];
    return df;

In [24]:
def us_unemployment():
    df = quandl.get("ECPI/JOB_G", trim_start = "1975-01-01", authtoken = api_key);
    df["Unemployment Rate"] = (df["Unemployment Rate"] - df["Unemployment Rate"][0]) / df["Unemployment Rate"][0] * 100.0; # <-------
    df = df.resample("1D").mean();
    df = df.resample("M").mean();
    return df;

In [27]:
sp500 = sp500_data();
US_GDP = gdp_data();
US_uneployment = us_unemployment();

m30 = mortgage_30y_resampled();
HPI_data = pd.read_pickle("./data/fiddy_states.pickle");
HPI_bench = HPI_Benchmark();

In [30]:
HPI = HPI_data.join([m30, US_uneployment, US_GDP, sp500]);
print(HPI);
print(HPI.corr());
# we have nans!!


                    AL          AK          AZ          AR           CA  \
Date                                                                      
1975-01-31    0.000000    0.000000    0.000000    0.000000     0.000000   
1975-02-28    0.626500    1.485775    1.688504    0.846192     0.356177   
1975-03-31    1.358575    3.006473    3.261346    1.581956     1.575690   
1975-04-30    2.254726    4.593530    4.475810    2.183669     3.573196   
1975-05-31    3.107829    6.327600    5.139617    2.786248     5.241395   
1975-06-30    3.585231    8.184557    5.035190    3.444136     5.987360   
1975-07-31    3.502089   10.041682    4.062221    4.024416     6.773494   
1975-08-31    2.956561   11.733579    2.489967    4.384871     8.176235   
1975-09-30    2.287053   13.207406    0.830264    4.436568     9.724202   
1975-10-31    1.937454   14.547916   -0.101833    4.351232    11.144933   
1975-11-30    2.169245   15.744312    0.285140    4.481393    12.103889   
1975-12-31    3.058008   16.739105    1.531214    4.917757    12.889105   
1976-01-31    4.534825   17.538142    2.804864    5.559395    14.021504   
1976-02-29    6.253562   18.206577    3.753225    6.434823    15.362166   
1976-03-31    7.772889   18.823716    4.286687    7.563406    17.060146   
1976-04-30    8.826475   19.427645    4.452694    8.820867    18.964491   
1976-05-31    9.417683   20.025020    4.387588    9.967773    20.430328   
1976-06-30    9.671872   20.604290    4.251205   10.916821    21.875237   
1976-07-31    9.771812   21.099753    4.241496   11.785855    23.757870   
1976-08-31    9.782293   21.486621    4.449148   12.623375    25.710721   
1976-09-30    9.768887   21.956947    4.784451   13.242979    27.501321   
1976-10-31    9.922304   22.684307    5.384709   13.547494    29.343080   
1976-11-30   10.377573   23.658539    6.179173   13.749658    31.602483   
1976-12-31   10.894791   24.831714    6.732942   14.101041    33.855274   
1977-01-31   11.195304   26.088213    7.013949   14.763413    36.187163   
1977-02-28   11.356455   27.261568    7.380511   15.732348    39.225118   
1977-03-31   11.554973   28.213660    8.194642   16.791279    42.966961   
1977-04-30   12.061624   28.941318    9.253028   17.689522    46.668950   
1977-05-31   12.909404   29.565088   10.178614   18.400081    50.443362   
1977-06-30   14.015250   30.170325   11.326848   19.116112    54.245925   
...                ...         ...         ...         ...          ...   
2014-04-30  245.866260  386.571725  406.909280  248.410714  1010.399968   
2014-05-31  248.082629  390.263660  409.520856  250.066595  1019.053595   
2014-06-30  250.543179  393.308415  411.366816  251.846349  1026.446961   
2014-07-31  252.573470  395.293287  412.116878  253.887270  1033.594251   
2014-08-31  253.196596  395.818022  411.514053  255.989913  1036.811388   
2014-09-30  251.852296  394.765009  411.113183  256.862594  1036.826164   
2014-10-31  249.525682  392.510542  413.308323  256.223219  1037.199029   
2014-11-30  247.950457  389.907200  417.139234  254.449504  1038.171418   
2014-12-31  247.707875  388.144514  419.956850  252.216476  1040.893291   
2015-01-31  248.543703  387.803384  422.122543  250.790753  1046.208721   
2015-02-28  249.860456  389.024615  425.805025  250.914197  1056.184665   
2015-03-31  251.968388  392.151116  430.825008  252.520537  1072.910229   
2015-04-30  254.806136  397.117937  436.139035  255.249598  1088.828004   
2015-05-31  257.858054  402.994152  440.817778  258.314389  1101.071703   
2015-06-30  260.402175  408.202726  444.411921  260.789950  1110.902231   
2015-07-31  261.659961  411.501283  447.732580  262.803073  1118.095865   
2015-08-31  261.494444  412.939749  451.088256  264.612855  1123.699281   
2015-09-30  260.074444  412.853631  454.173784  265.759113  1126.659870   
2015-10-31  258.421392  411.736477  455.744013  265.714120  1128.677822   
2015-11-30  257.133351  410.776419  456.247469  264.510389  1131.894630   
2015-12-31  256.433936  410.052668  457.008713  262.755205  1134.915552   
2016-01-31  257.194890  409.352067  459.056946  261.351443  1137.739040   
2016-02-29  259.590234  409.346735  464.133109  261.420731  1149.973812   
2016-03-31  262.971657  410.675440  471.296531  263.531913  1169.550765   
2016-04-30  266.981891  413.274750  477.407709  266.759490  1183.579856   
2016-05-31  270.559464  416.299943  480.931993  269.875614  1194.252737   
2016-06-30  273.277608  418.479537  483.422309  272.506749  1203.821205   
2016-07-31  275.425546  419.474579  485.562537  274.404456  1210.725882   
2016-08-31  276.433730  419.880154  485.400915  275.503665  1217.351884   
2016-09-30  275.720049  418.201305  483.999395  275.903351  1220.657344   

                    CO          CT          DE          FL          GA  \
Date                                                                     
1975-01-31    0.000000    0.000000    0.000000    0.000000    0.000000   
1975-02-28    1.159639    2.123926    0.142451    3.938796   -0.902841   
1975-03-31    2.299449    3.719898    0.387918    9.798243   -1.282758   
1975-04-30    3.359028    4.616778    0.891619   16.974819   -1.068371   
1975-05-31    4.226895    4.901787    1.752086   17.891884   -0.676830   
1975-06-30    4.946755    4.784686    2.775176   12.718161   -0.559763   
1975-07-31    5.441442    4.609283    3.678041    8.731497   -0.925559   
1975-08-31    5.424546    4.574008    4.433470    6.816113   -1.771578   
1975-09-30    5.052297    4.756528    5.055278    6.379602   -2.941948   
1975-10-31    4.902950    5.201152    5.455150    6.856612   -3.891893   
1975-11-30    5.437419    5.991798    5.680863    7.690459   -4.177490   
1975-12-31    6.502478    6.911271    5.831022    8.122161   -3.965788   
1976-01-31    7.666518    7.651467    5.885435    7.985336   -3.629695   
1976-02-29    8.734124    8.124430    5.854230    8.075983   -3.502448   
1976-03-31    9.760066    8.390129    5.852097    9.899489   -3.564272   
1976-04-30   10.661236    8.610553    6.050754   13.890860   -3.391323   
1976-05-31   11.255803    8.913303    6.352538   14.990157   -2.687759   
1976-06-30   11.607159    9.430170    6.503004   12.222487   -1.370684   
1976-07-31   11.761682   10.160434    6.468993   10.229820    0.062795   
1976-08-31   11.800039   10.746969    6.336433    9.817070    0.796985   
1976-09-30   12.000619   11.035605    6.225393   10.183240    0.889276   
1976-10-31   12.753227   11.374159    6.300095   10.540737    0.644578   
1976-11-30   14.098768   11.632012    6.682036   10.731391    0.292502   
1976-12-31   15.488586   11.460469    7.343885   10.187048    0.100579   
1977-01-31   16.533181   11.164393    8.166584    8.538523    0.075448   
1977-02-28   17.409021   11.080764    8.965378    6.340539    0.244911   
1977-03-31   18.385935   11.419992    9.508776    6.768040    0.599215   
1977-04-30   19.754813   12.624032    9.694874   12.473413    1.123316   
1977-05-31   21.511448   14.634454    9.621706   16.440433    1.746434   
1977-06-30   23.577958   16.908970    9.537372   14.994788    2.418784   
...                ...         ...         ...         ...         ...   
2014-04-30  596.172025  432.579005  437.283492  382.003862  263.488527   
2014-05-31  604.954587  440.143425  442.567212  387.503439  268.212962   
2014-06-30  610.798650  445.972709  447.640849  391.914051  272.602709   
2014-07-31  613.822772  446.267156  451.603760  394.157452  275.444880   
2014-08-31  616.488966  443.330891  453.945559  395.281891  276.294342   
2014-09-30  619.365004  440.290255  454.160192  397.270223  276.227034   
2014-10-31  622.226623  437.826237  451.978115  399.409111  276.103954   
2014-11-30  624.765636  434.343144  448.734225  400.998500  275.353623   
2014-12-31  627.425690  429.573354  445.806958  402.974697  274.384404   
2015-01-31  633.200319  425.919731  443.869614  405.969438  275.566987   
2015-02-28  643.947460  425.517771  443.632909  411.263354  278.972394   
2015-03-31  657.185251  428.986407  445.745319  417.707260  284.157379   
2015-04-30  670.349950  435.310142  450.232406  424.094719  289.876222   
2015-05-31  682.211684  442.404902  455.319695  431.817190  294.606553   
2015-06-30  691.150245  447.997447  458.357147  439.470393  297.858406   
2015-07-31  697.117846  450.446998  458.766143  445.241002  299.650176   
2015-08-31  699.673498  448.342724  458.568981  448.159761  300.668951   
2015-09-30  700.225879  442.876392  459.332435  450.071764  301.521307   
2015-10-31  700.364544  437.924368  461.452741  453.322208  302.067586   
2015-11-30  699.090706  434.436872  464.206110  456.252884  301.880191   
2015-12-31  700.078379  431.145331  466.057702  457.408338  302.035963   
2016-01-31  707.104288  428.634406  466.674748  458.809408  303.135051   
2016-02-29  719.130116  428.500988  466.812959  464.340751  305.539534   
2016-03-31  734.377344  431.168168  467.438339  473.508967  310.378387   
2016-04-30  750.021408  436.383717  468.701478  481.543671  317.433515   
2016-05-31  763.761039  442.268284  469.645983  487.994280  323.769344   
2016-06-30  773.432389  446.820339  470.138873  494.067904  327.340363   
2016-07-31  779.019676  448.688525  470.599933  499.058597  328.824522   
2016-08-31  781.449563  447.060055  470.679280  504.123480  328.101651   
2016-09-30  782.063211  443.677216  470.232644  507.994365  326.663375   

               ...               VT          VA           WA          WV  \
Date           ...                                                         
1975-01-31     ...         0.000000    0.000000     0.000000    0.000000   
1975-02-28     ...         0.945247    0.987288     0.397561    2.495069   
1975-03-31     ...         1.857227    1.707474     1.015723    5.093474   
1975-04-30     ...         2.685578    2.238392     1.757887    7.772685   
1975-05-31     ...         3.413295    2.684036     2.426439   10.469784   
1975-06-30     ...         4.071590    3.117159     3.113941   13.046164   
1975-07-31     ...         4.631886    3.760493     3.903406   15.312434   
1975-08-31     ...         5.024287    4.455311     4.444552   17.128174   
1975-09-30     ...         5.274156    4.710664     4.554098   18.356342   
1975-10-31     ...         5.444302    4.560089     4.690224   18.915894   
1975-11-30     ...         5.540865    4.228007     5.415746   18.968063   
1975-12-31     ...         5.545064    3.828741     6.587080   18.775221   
1976-01-31     ...         5.456731    3.558213     7.811744   18.531543   
1976-02-29     ...         5.319519    3.785323     9.094661   18.427289   
1976-03-31     ...         5.248234    4.514428    10.388287   18.519463   
1976-04-30     ...         5.402452    5.365034    11.602146   18.650574   
1976-05-31     ...         5.832834    6.234939    12.936907   18.665876   
1976-06-30     ...         6.492038    6.980198    14.721205   18.522646   
1976-07-31     ...         7.304997    7.478024    16.960415   18.246701   
1976-08-31     ...         8.155671    8.060447    18.871499   17.940432   
1976-09-30     ...         8.919493    8.655483    19.949582   17.741795   
1976-10-31     ...         9.514585    9.058338    20.693776   17.697603   
1976-11-30     ...         9.960440    9.461216    21.715477   17.825750   
1976-12-31     ...        10.353621    9.810187    22.921525   18.199802   
1977-01-31     ...        10.798753   10.100165    23.820062   18.888071   
1977-02-28     ...        11.364105   10.573548    24.774259   19.872848   
1977-03-31     ...        12.108834   11.316854    26.574337   21.098002   
1977-04-30     ...        13.073388   12.204208    29.413775   22.529433   
1977-05-31     ...        14.263468   13.244328    32.510494   24.006401   
1977-06-30     ...        15.637513   14.449912    35.362500   25.331314   
...            ...              ...         ...          ...         ...   
2014-04-30     ...       504.420103  505.048299   770.625368  233.712623   
2014-05-31     ...       509.543659  510.746397   782.998179  235.699798   
2014-06-30     ...       513.544643  514.334048   792.681677  237.865236   
2014-07-31     ...       514.599194  514.895515   799.271386  240.221206   
2014-08-31     ...       512.189046  512.889871   800.289948  242.476496   
2014-09-30     ...       507.273136  509.976829   797.573113  243.747829   
2014-10-31     ...       501.377350  507.674666   796.541074  243.086433   
2014-11-30     ...       496.332644  506.226395   798.458571  240.793911   
2014-12-31     ...       493.428652  504.406720   800.290783  238.471701   
2015-01-31     ...       493.083171  502.154617   803.823467  237.491957   
2015-02-28     ...       495.396982  502.500981   813.645225  238.543861   
2015-03-31     ...       500.764435  507.197803   829.088039  241.645820   
2015-04-30     ...       509.145529  514.043592   845.941626  245.904464   
2015-05-31     ...       518.690691  520.661394   860.823929  249.653184   
2015-06-30     ...       525.996168  525.346681   873.204263  251.593704   
2015-07-31     ...       529.128323  527.036425   882.807285  251.742479   
2015-08-31     ...       528.694709  527.198998   888.227410  250.685370   
2015-09-30     ...       526.137079  526.732496   890.927922  248.811583   
2015-10-31     ...       522.467177  524.488922   894.654488  246.616000   
2015-11-30     ...       518.472561  520.738982   898.808123  244.271305   
2015-12-31     ...       515.077850  517.037002   901.832337  241.888020   
2016-01-31     ...       512.922018  516.088168   908.298531  239.948443   
2016-02-29     ...       512.288714  520.193418   923.400492  239.142864   
2016-03-31     ...       513.488225  527.834316   942.776448  240.130035   
2016-04-30     ...       517.096104  535.541641   960.945983  242.826071   
2016-05-31     ...       522.192972  542.250153   976.335026  246.333355   
2016-06-30     ...       527.644542  546.348145   987.891996  249.246015   
2016-07-31     ...       533.048177  546.749730   997.180682  250.691320   
2016-08-31     ...       537.776947  546.198870  1004.905467  251.193646   
2016-09-30     ...       537.879253  544.683876  1007.473323  250.924579   

                    WI          WY        M30  Unemployment Rate         GDP  \
Date                                                                           
1975-01-31    0.000000    0.000000   0.000000           0.000000         NaN   
1975-02-28    1.404920    1.438502  -3.393425           0.000000         NaN   
1975-03-31    2.791371    2.962512  -5.620361           6.172840         NaN   
1975-04-30    4.034165    4.545011  -6.468717           8.641975         NaN   
1975-05-31    5.047628    6.080901  -5.514316          11.111111         NaN   
1975-06-30    5.816307    7.518640  -5.726405           8.641975         NaN   
1975-07-31    6.405591    8.856685  -5.726405           6.172840         NaN   
1975-08-31    6.912258   10.059371  -5.196182           3.703704         NaN   
1975-09-30    7.583841   11.092890  -3.181336           3.703704         NaN   
1975-10-31    8.400400   11.882282  -2.226935           3.703704         NaN   
1975-11-30    8.978359   12.427131  -2.969247           2.469136         NaN   
1975-12-31    9.184256   12.812901  -3.499470           1.234568         NaN   
1976-01-31    9.182637   13.143676  -4.347826          -2.469136         NaN   
1976-02-29    9.114429   13.561963  -6.574761          -4.938272         NaN   
1976-03-31    9.185484   14.158162  -7.104984          -6.172840         NaN   
1976-04-30    9.659574   14.957932  -7.423118          -4.938272         NaN   
1976-05-31   10.494671   16.034505  -6.998940          -8.641975         NaN   
1976-06-30   11.257141   17.501929  -6.150583          -6.172840         NaN   
1976-07-31   11.806514   19.295575  -5.302227          -3.703704         NaN   
1976-08-31   12.398252   21.167135  -4.559915          -3.703704         NaN   
1976-09-30   13.103498   23.020224  -4.772004          -6.172840         NaN   
1976-10-31   13.777959   24.894122  -5.302227          -4.938272         NaN   
1976-11-30   14.570996   26.663306  -6.574761          -3.703704         NaN   
1976-12-31   15.613092   28.107359  -6.786850          -3.703704         NaN   
1977-01-31   16.785958   29.241933  -7.529162          -7.407407         NaN   
1977-02-28   18.240366   30.261494  -8.059385          -6.172840         NaN   
1977-03-31   20.038816   31.287244  -7.847296          -8.641975         NaN   
1977-04-30   21.827885   32.378251  -7.211029         -11.111111         NaN   
1977-05-31   23.543853   33.621513  -6.468717         -13.580247         NaN   
1977-06-30   25.613549   35.179892  -6.044539         -11.111111         NaN   
...                ...         ...        ...                ...         ...   
2014-04-30  324.803941  453.643224 -53.976670                NaN  443.984616   
2014-05-31  330.489626  457.895779 -55.567338                NaN  442.664840   
2014-06-30  334.946121  461.371894 -55.885472                NaN  420.044256   
2014-07-31  337.152747  463.166557 -56.203606                NaN  450.767893   
2014-08-31  337.060708  463.586895 -56.309650                NaN  444.740655   
2014-09-30  335.825595  463.681686 -55.885472                NaN  444.985643   
2014-10-31  334.019785  464.165816 -57.158006                NaN  453.994889   
2014-11-30  330.688464  464.929590 -57.582185                NaN  435.425832   
2014-12-31  326.419144  465.638007 -59.066808                NaN  435.689260   
2015-01-31  324.377915  466.513228 -60.657476                NaN  287.371249   
2015-02-28  326.181687  467.895647 -60.657476                NaN  281.957799   
2015-03-31  330.719741  470.524453 -60.021209                NaN  319.796633   
2015-04-30  336.821572  474.750730 -61.081654                NaN  300.026343   
2015-05-31  343.789138  480.061628 -59.278897                NaN  293.854219   
2015-06-30  348.880286  485.343765 -57.794274                NaN  291.491267   
2015-07-31  350.787097  488.969853 -57.051962                NaN  304.536235   
2015-08-31  350.832834  489.777344 -58.536585                NaN  297.768763   
2015-09-30  349.840461  488.299907 -58.748674                NaN  289.800058   
2015-10-31  349.031360  485.463358 -59.703075                NaN  297.423672   
2015-11-30  348.354613  481.853067 -58.218452                NaN  285.719554   
2015-12-31  346.197506  478.710814 -58.006363                NaN  285.637892   
2016-01-31  344.385518  477.248947 -58.960764                NaN  275.991149   
2016-02-29  346.137649  477.910085 -61.187699                NaN  281.965702   
2016-03-31  351.449019  480.455336 -60.869565                NaN  311.390638   
2016-04-30  358.234846  483.805067 -61.717922                NaN  298.361476   
2016-05-31  365.291608  486.503387 -61.823966                NaN  292.436975   
2016-06-30  371.872553  488.322052 -62.142100                NaN  297.903111   
2016-07-31  376.186779  489.823421 -63.520679                NaN  301.933563   
2016-08-31  378.067567  490.876740 -63.520679                NaN  307.075683   
2016-09-30  378.467647  490.012701 -63.308590                NaN  295.985353   

                  sp500  
Date                     
1975-01-31     3.323491  
1975-02-28    14.049322  
1975-03-31    19.367785  
1975-04-30    20.636734  
1975-05-31    28.287322  
1975-06-30    31.563633  
1975-07-31    31.691968  
1975-08-31    22.047282  
1975-09-30    20.564398  
1975-10-31    26.120382  
1975-11-30    28.243286  
1975-12-31    26.299944  
1976-01-31    37.917585  
1976-02-29    43.299829  
1976-03-31    43.933281  
1976-04-30    45.136721  
1976-05-31    44.043848  
1976-06-30    44.905046  
1976-07-31    48.370993  
1976-08-31    47.076483  
1976-09-30    50.154249  
1976-10-31    45.073663  
1976-11-30    44.088702  
1976-12-31    49.025921  
1977-01-31    47.819064  
1977-02-28    43.750228  
1977-03-31    43.200286  
1977-04-30    41.036589  
1977-05-31    40.624337  
1977-06-30    41.372498  
...                 ...  
2014-04-30  2554.511256  
2014-05-31  2590.825945  
2014-06-30  2672.444153  
2014-07-31  2709.482988  
2014-08-31  2693.011282  
2014-09-30  2738.140546  
2014-10-31  2658.471120  
2014-11-30  2811.251627  
2014-12-31  2825.055212  
2015-01-31  2787.908903  
2015-02-28  2864.823730  
2015-03-31  2861.683541  
2015-04-30  2882.860245  
2015-05-31  2907.181301  
2015-06-30  2889.155017  
2015-07-31  2881.836163  
2015-08-31  2804.550930  
2015-09-30  2668.620677  
2015-10-31  2783.116375  
2015-11-30  2862.574989  
2015-12-31  2824.789227  
2016-01-31  2631.877838  
2016-02-29  2611.687900  
2016-03-31  2779.045998  
2016-04-30  2855.339802  
2016-05-31  2841.122584  
2016-06-30  2867.238046  
2016-07-31  2959.806188  
2016-08-31  3000.501316  
2016-09-30  2972.320764  

[501 rows x 54 columns]
                         AL        AK        AZ        AR        CA        CO  \
AL                 1.000000  0.946418  0.937592  0.995119  0.942310  0.965541   
AK                 0.946418  1.000000  0.910237  0.967983  0.921818  0.960382   
AZ                 0.937592  0.910237  1.000000  0.936454  0.976776  0.919486   
AR                 0.995119  0.967983  0.936454  1.000000  0.945774  0.976929   
CA                 0.942310  0.921818  0.976776  0.945774  1.000000  0.938870   
CO                 0.965541  0.960382  0.919486  0.976929  0.938870  1.000000   
CT                 0.953146  0.884600  0.917688  0.944746  0.942463  0.889392   
DE                 0.982824  0.938068  0.948801  0.977921  0.967911  0.936764   
FL                 0.929395  0.900713  0.994380  0.928081  0.985869  0.910895   
GA                 0.978346  0.899525  0.949167  0.968410  0.951573  0.956025   
HI                 0.944752  0.947413  0.916923  0.951617  0.951263  0.928241   
ID                 0.983136  0.953404  0.965198  0.980867  0.954768  0.962413   
IL                 0.983692  0.899603  0.947529  0.971113  0.953901  0.939419   
IN                 0.983855  0.903966  0.899364  0.977312  0.914634  0.961496   
IA                 0.985434  0.954436  0.912447  0.989720  0.930562  0.985693   
KS                 0.989496  0.964757  0.926154  0.995277  0.941173  0.989344   
KY                 0.994332  0.946701  0.917390  0.994178  0.936200  0.978925   
LA                 0.966664  0.992502  0.924051  0.982658  0.930218  0.975262   
ME                 0.976759  0.940709  0.936183  0.976928  0.968159  0.946687   
MD                 0.969675  0.944668  0.965352  0.969750  0.980935  0.933739   
MA                 0.970801  0.930523  0.934268  0.972517  0.966969  0.955733   
MI                 0.903473  0.771111  0.863715  0.886418  0.870084  0.888848   
MN                 0.976315  0.934883  0.959047  0.977211  0.972211  0.972480   
MS                 0.996520  0.963309  0.938513  0.997697  0.941894  0.973874   
MO                 0.993873  0.938797  0.947188  0.991297  0.958757  0.972391   
MT                 0.974121  0.982212  0.928209  0.983787  0.939705  0.975017   
NE                 0.986508  0.953399  0.914148  0.991408  0.930202  0.988325   
NV                 0.872598  0.801393  0.964619  0.861622  0.943090  0.838751   
NH                 0.959618  0.913121  0.940935  0.958676  0.967608  0.932572   
NJ                 0.971680  0.928850  0.948086  0.968597  0.968653  0.927007   
NM                 0.993101  0.962755  0.943021  0.992937  0.939615  0.953317   
NY                 0.977840  0.944144  0.932909  0.978121  0.962826  0.944382   
NC                 0.998317  0.941936  0.929046  0.993249  0.939050  0.968365   
ND                 0.902227  0.964140  0.846203  0.929000  0.883047  0.950659   
OH                 0.969046  0.862634  0.894522  0.956087  0.905167  0.936379   
OK                 0.947181  0.988448  0.901707  0.969293  0.908747  0.969076   
OR                 0.977741  0.959812  0.955111  0.979389  0.956000  0.975643   
PA                 0.987218  0.951013  0.928817  0.986576  0.956387  0.951410   
RI                 0.954402  0.895370  0.946265  0.948688  0.974351  0.910224   
SC                 0.998306  0.951217  0.941651  0.994964  0.951189  0.972161   
SD                 0.976382  0.974957  0.906742  0.986937  0.930504  0.986830   
TN                 0.994551  0.958200  0.932276  0.995595  0.945515  0.982027   
TX                 0.940841  0.980514  0.896961  0.962400  0.917953  0.977895   
UT                 0.979483  0.963944  0.936448  0.982990  0.928609  0.978576   
VT                 0.978591  0.956485  0.924615  0.981747  0.956815  0.948834   
VA                 0.975277  0.962226  0.958568  0.979944  0.979699  0.954017   
WA                 0.985060  0.958805  0.956881  0.984041  0.965064  0.972331   
WV                 0.982097  0.972376  0.919514  0.990395  0.936562  0.977987   
WI                 0.991161  0.930831  0.935717  0.986244  0.945139  0.967228   
WY                 0.946695  0.987373  0.909381  0.964090  0.919537  0.959549   
M30               -0.796453 -0.734748 -0.673961 -0.788178 -0.733805 -0.787303   
Unemployment Rate -0.313968 -0.077318 -0.363260 -0.274777 -0.309076 -0.281464   
GDP                0.679765  0.831059  0.461065  0.738729  0.513147  0.668505   
sp500              0.912874  0.894500  0.857531  0.919558  0.873121  0.955356   

                         CT        DE        FL        GA    ...           VT  \
AL                 0.953146  0.982824  0.929395  0.978346    ...     0.978591   
AK                 0.884600  0.938068  0.900713  0.899525    ...     0.956485   
AZ                 0.917688  0.948801  0.994380  0.949167    ...     0.924615   
AR                 0.944746  0.977921  0.928081  0.968410    ...     0.981747   
CA                 0.942463  0.967911  0.985869  0.951573    ...     0.956815   
CO                 0.889392  0.936764  0.910895  0.956025    ...     0.948834   
CT                 1.000000  0.979810  0.926355  0.947469    ...     0.967854   
DE                 0.979810  1.000000  0.953177  0.960868    ...     0.991994   
FL                 0.926355  0.953177  1.000000  0.944083    ...     0.927173   
GA                 0.947469  0.960868  0.944083  1.000000    ...     0.942940   
HI                 0.915631  0.964760  0.918086  0.904039    ...     0.975666   
ID                 0.917955  0.971288  0.954029  0.960638    ...     0.963029   
IL                 0.958374  0.979059  0.950143  0.983955    ...     0.958690   
IN                 0.922407  0.949262  0.891750  0.977512    ...     0.947160   
IA                 0.910157  0.957725  0.904738  0.957605    ...     0.966561   
KS                 0.928693  0.965136  0.917737  0.968449    ...     0.972309   
KY                 0.937581  0.970905  0.911063  0.973330    ...     0.975415   
LA                 0.897732  0.949326  0.911729  0.925457    ...     0.963140   
ME                 0.983722  0.993703  0.942408  0.959319    ...     0.994193   
MD                 0.967394  0.994339  0.971156  0.947545    ...     0.986123   
MA                 0.978691  0.980283  0.940686  0.970928    ...     0.979159   
MI                 0.858025  0.864550  0.862790  0.954318    ...     0.838633   
MN                 0.944407  0.970738  0.961250  0.980903    ...     0.960967   
MS                 0.944285  0.978320  0.928466  0.970387    ...     0.979034   
MO                 0.959064  0.980589  0.944549  0.988700    ...     0.973695   
MT                 0.905319  0.963541  0.919298  0.929777    ...     0.975319   
NE                 0.913586  0.953909  0.904769  0.968433    ...     0.961521   
NV                 0.876240  0.892577  0.972301  0.918296    ...     0.845819   
NH                 0.987413  0.978789  0.949645  0.964654    ...     0.970435   
NJ                 0.989316  0.995439  0.955855  0.956171    ...     0.986350   
NM                 0.947403  0.982960  0.933961  0.957731    ...     0.979584   
NY                 0.983996  0.993968  0.937888  0.957303    ...     0.994886   
NC                 0.952985  0.979568  0.920931  0.980970    ...     0.977722   
ND                 0.823583  0.887317  0.832715  0.849939    ...     0.927418   
OH                 0.918310  0.935233  0.890929  0.979829    ...     0.921110   
OK                 0.871562  0.921562  0.886867  0.910634    ...     0.939188   
OR                 0.905014  0.964901  0.946589  0.952781    ...     0.963832   
PA                 0.969914  0.994418  0.929922  0.955997    ...     0.997804   
RI                 0.988253  0.985562  0.961259  0.956066    ...     0.969925   
SC                 0.955383  0.984438  0.935053  0.981719    ...     0.981423   
SD                 0.905662  0.956217  0.897824  0.939083    ...     0.974324   
TN                 0.940744  0.974580  0.922868  0.974288    ...     0.979467   
TX                 0.873570  0.918837  0.882969  0.915710    ...     0.942039   
UT                 0.890769  0.950357  0.918716  0.949785    ...     0.954472   
VT                 0.967854  0.991994  0.927173  0.942940    ...     1.000000   
VA                 0.962382  0.992477  0.961733  0.949727    ...     0.992917   
WA                 0.929065  0.979299  0.951094  0.962595    ...     0.976825   
WV                 0.914855  0.965557  0.910600  0.940694    ...     0.978471   
WI                 0.939192  0.974029  0.934246  0.977461    ...     0.965785   
WY                 0.871945  0.938417  0.898932  0.891159    ...     0.956335   
M30               -0.750397 -0.790202 -0.682449 -0.752580    ...    -0.812577   
Unemployment Rate -0.307110 -0.259425 -0.328826 -0.415562    ...    -0.220608   
GDP                0.561277  0.648246  0.428435  0.419041    ...     0.771710   
sp500              0.810995  0.866882  0.836135  0.905154    ...     0.886924   

                         VA        WA        WV        WI        WY       M30  \
AL                 0.975277  0.985060  0.982097  0.991161  0.946695 -0.796453   
AK                 0.962226  0.958805  0.972376  0.930831  0.987373 -0.734748   
AZ                 0.958568  0.956881  0.919514  0.935717  0.909381 -0.673961   
AR                 0.979944  0.984041  0.990395  0.986244  0.964090 -0.788178   
CA                 0.979699  0.965064  0.936562  0.945139  0.919537 -0.733805   
CO                 0.954017  0.972331  0.977987  0.967228  0.959549 -0.787303   
CT                 0.962382  0.929065  0.914855  0.939192  0.871945 -0.750397   
DE                 0.992477  0.979299  0.965557  0.974029  0.938417 -0.790202   
FL                 0.961733  0.951094  0.910600  0.934246  0.898932 -0.682449   
GA                 0.949727  0.962595  0.940694  0.977461  0.891159 -0.752580   
HI                 0.975532  0.970579  0.960787  0.925968  0.951080 -0.795357   
ID                 0.974919  0.994989  0.977901  0.976381  0.963630 -0.767660   
IL                 0.964414  0.969529  0.951565  0.991507  0.904993 -0.779350   
IN                 0.938717  0.958916  0.962436  0.984325  0.903299 -0.806090   
IA                 0.963537  0.980342  0.992064  0.988385  0.962935 -0.820293   
KS                 0.970785  0.981429  0.989891  0.986305  0.964479 -0.789270   
KY                 0.968466  0.979889  0.986531  0.991031  0.947108 -0.818853   
LA                 0.967926  0.974058  0.986051  0.955028  0.991333 -0.737043   
ME                 0.991146  0.970766  0.964921  0.968257  0.935928 -0.802695   
MD                 0.996590  0.978610  0.962117  0.964728  0.947355 -0.768376   
MA                 0.979110  0.959213  0.953810  0.967552  0.918743 -0.795487   
MI                 0.846263  0.871264  0.854135  0.927605  0.767608 -0.722214   
MN                 0.974144  0.974422  0.963952  0.988026  0.935965 -0.765481   
MS                 0.977545  0.985463  0.988062  0.987715  0.962575 -0.790514   
MO                 0.975935  0.980125  0.974391  0.993836  0.936164 -0.784704   
MT                 0.978356  0.988061  0.994438  0.966600  0.992572 -0.798324   
NE                 0.958325  0.975139  0.985446  0.984822  0.950928 -0.800434   
NV                 0.890009  0.887098  0.829693  0.886561  0.796793 -0.596116   
NH                 0.974311  0.947221  0.934251  0.956025  0.901631 -0.760839   
NJ                 0.989094  0.964363  0.951430  0.964999  0.925147 -0.774544   
NM                 0.979834  0.983676  0.981711  0.979327  0.962241 -0.766544   
NY                 0.990348  0.969834  0.964604  0.965848  0.936187 -0.804832   
NC                 0.971135  0.982096  0.979189  0.987937  0.939552 -0.805513   
ND                 0.923280  0.929351  0.955674  0.882989  0.965009 -0.787380   
OH                 0.916725  0.936785  0.931484  0.977248  0.860133 -0.781626   
OK                 0.943892  0.950984  0.968331  0.933125  0.977162 -0.689749   
OR                 0.975474  0.996327  0.985248  0.976817  0.974578 -0.791154   
PA                 0.990727  0.981644  0.979808  0.974825  0.950632 -0.812888   
RI                 0.976730  0.948184  0.926765  0.954967  0.890629 -0.763330   
SC                 0.979027  0.987777  0.982225  0.989545  0.949415 -0.791708   
SD                 0.969555  0.980315  0.994590  0.969068  0.978354 -0.827213   
TN                 0.975512  0.986922  0.988203  0.984005  0.956694 -0.808287   
TX                 0.943471  0.952730  0.963840  0.921060  0.966035 -0.726491   
UT                 0.960229  0.987649  0.986347  0.970967  0.974129 -0.782244   
VT                 0.992917  0.976825  0.978471  0.965785  0.956335 -0.812577   
VA                 1.000000  0.984165  0.976119  0.968290  0.962492 -0.786206   
WA                 0.984165  1.000000  0.985030  0.979435  0.969017 -0.791745   
WV                 0.976119  0.985030  1.000000  0.976364  0.981313 -0.810091   
WI                 0.968290  0.979435  0.976364  1.000000  0.938097 -0.806441   
WY                 0.962492  0.969017  0.981313  0.938097  1.000000 -0.753197   
M30               -0.786206 -0.791745 -0.810091 -0.806441 -0.753197  1.000000   
Unemployment Rate -0.233845 -0.278024 -0.242044 -0.322161 -0.097704  0.286235   
GDP                0.700300  0.673887  0.803084  0.589242  0.828737 -0.821702   
sp500              0.887390  0.921527  0.932191  0.908548  0.899705 -0.803273   

                   Unemployment Rate       GDP     sp500  
AL                         -0.313968  0.679765  0.912874  
AK                         -0.077318  0.831059  0.894500  
AZ                         -0.363260  0.461065  0.857531  
AR                         -0.274777  0.738729  0.919558  
CA                         -0.309076  0.513147  0.873121  
CO                         -0.281464  0.668505  0.955356  
CT                         -0.307110  0.561277  0.810995  
DE                         -0.259425  0.648246  0.866882  
FL                         -0.328826  0.428435  0.836135  
GA                         -0.415562  0.419041  0.905154  
HI                         -0.184746  0.765021  0.877679  
ID                         -0.299751  0.640120  0.908633  
IL                         -0.366424  0.459451  0.874275  
IN                         -0.392803  0.605751  0.926331  
IA                         -0.289050  0.732293  0.942269  
KS                         -0.277454  0.712343  0.936833  
KY                         -0.312877  0.714928  0.934039  
LA                         -0.151179  0.797947  0.913530  
ME                         -0.268087  0.675907  0.878194  
MD                         -0.244354  0.637051  0.859829  
MA                         -0.301744  0.606039  0.888088  
MI                         -0.549625  0.045045  0.862239  
MN                         -0.318449  0.523896  0.902356  
MS                         -0.282011  0.717561  0.920877  
MO                         -0.335008  0.590925  0.910620  
MT                         -0.189639  0.795616  0.921798  
NE                         -0.306369  0.705794  0.946591  
NV                         -0.438223  0.161367  0.768529  
NH                         -0.306332  0.547110  0.853133  
NJ                         -0.259999  0.613614  0.847149  
NM                         -0.246882  0.726003  0.888583  
NY                         -0.251366  0.697961  0.876302  
NC                         -0.325562  0.685751  0.921538  
ND                         -0.126965  0.867657  0.925764  
OH                         -0.436494  0.394007  0.895135  
OK                         -0.111695  0.800513  0.901724  
OR                         -0.280125  0.680518  0.928799  
PA                         -0.249097  0.750565  0.891351  
RI                         -0.306005  0.497306  0.827238  
SC                         -0.303117  0.670552  0.919284  
SD                         -0.230403  0.807501  0.945701  
TN                         -0.313450  0.728337  0.940427  
TX                         -0.161835  0.778876  0.926505  
UT                         -0.291961  0.723834  0.942189  
VT                         -0.220608  0.771710  0.886924  
VA                         -0.233845  0.700300  0.887390  
WA                         -0.278024  0.673887  0.921527  
WV                         -0.242044  0.803084  0.932191  
WI                         -0.322161  0.589242  0.908548  
WY                         -0.097704  0.828737  0.899705  
M30                         0.286235 -0.821702 -0.803273  
Unemployment Rate           1.000000  0.551874 -0.437767  
GDP                         0.551874  1.000000  0.653556  
sp500                      -0.437767  0.653556  1.000000  

[54 rows x 54 columns]

In [32]:
HPI.dropna(inplace = True);
print(HPI);
print(HPI.corr());


                    AL          AK          AZ          AR          CA  \
Date                                                                     
1990-01-31   97.377466   62.960664  125.925384   90.013079  407.639219   
1990-02-28   97.306825   64.745987  125.954481   90.292939  409.393746   
1990-03-31   97.640926   68.843816  125.677184   90.749096  412.358848   
1990-04-30   98.347335   75.545290  125.537118   91.190719  414.727667   
1990-05-31   99.135672   84.269489  125.820526   91.693828  415.785301   
1990-06-30   99.593283   93.030215  126.319903   92.282205  417.279958   
1990-07-31   99.601506   99.468341  126.555572   92.875334  419.261081   
1990-08-31   99.558429  102.479213  126.226122   93.524309  419.631783   
1990-09-30   99.776456  102.769503  125.371627   94.010613  417.928706   
1990-10-31  100.047438  101.770286  124.149933   94.146892  414.911709   
1990-11-30   99.956110  100.506280  123.078108   94.158401  411.244025   
1990-12-31   99.546794   99.752104  122.776916   94.123478  409.159154   
1991-01-31   99.314542  100.034879  123.256689   93.842236  407.286495   
1991-02-28   99.657568  101.103682  124.026363   93.330496  405.020035   
1991-03-31  100.577049  102.604247  124.513898   92.998490  404.294332   
1991-04-30  101.671347  104.630501  124.827124   92.956769  404.178454   
1991-05-31  102.599011  107.102855  125.441600   93.071307  404.196405   
1991-06-30  103.200775  109.665373  125.998923   93.320251  404.260056   
1991-07-31  103.442471  111.786794  125.920280   93.541472  403.911409   
1991-08-31  103.627099  112.903945  125.774525   93.911248  401.912444   
1991-09-30  103.937729  112.887070  126.729607   94.863061  400.708569   
1991-10-31  104.434315  112.242139  128.685113   96.132880  401.072934   
1991-11-30  105.074298  111.689744  130.116024   97.223110  400.702644   
1991-12-31  105.503346  111.777175  129.916873   98.138705  399.922259   
1992-01-31  105.793151  112.722585  129.112351   98.927428  399.437537   
1992-02-29  106.350717  114.303064  129.024746   99.413528  398.731115   
1992-03-31  106.988301  116.123092  129.702411   99.435327  397.547336   
1992-04-30  107.390774  117.688923  130.430471   99.143346  395.991357   
1992-05-31  107.835257  118.645558  130.696415   99.200669  393.540740   
1992-06-30  108.475438  119.222336  130.799372  100.021088  391.395764   
...                ...         ...         ...         ...         ...   
2009-07-31  258.619045  354.589497  324.072216  245.195105  770.147557   
2009-08-31  257.897208  353.481429  322.592409  245.926884  775.003275   
2009-09-30  257.677144  351.650661  321.172735  246.063066  778.528537   
2009-10-31  258.097017  349.441973  319.229860  245.338830  782.693570   
2009-11-30  257.143440  347.223007  316.220031  243.432040  785.629726   
2009-12-31  254.408819  345.254958  312.555527  240.776615  782.488173   
2010-01-31  251.066223  344.455223  309.107341  238.561159  776.883857   
2010-02-28  247.772524  345.561947  306.461511  237.605198  777.972309   
2010-03-31  245.669417  348.136747  304.467542  237.900144  783.436761   
2010-04-30  245.683216  351.487440  303.235790  239.421831  785.947684   
2010-05-31  246.268488  354.437578  303.109262  240.931121  786.188565   
2010-06-30  245.246149  355.989993  301.631729  240.656353  783.071590   
2010-07-31  243.024472  355.973197  296.656489  238.622912  779.486285   
2010-08-31  240.796152  354.711777  288.786372  235.355755  773.913770   
2010-09-30  238.407770  353.171831  280.358297  231.938534  765.252120   
2010-10-31  235.645371  352.359999  272.686657  229.651160  757.185980   
2010-11-30  232.470548  352.311501  266.696745  228.267725  749.536634   
2010-12-31  229.394844  352.695948  263.579234  227.552960  741.611048   
2011-01-31  227.220711  353.232236  262.828623  227.651569  733.851665   
2011-02-28  226.255820  353.781916  262.712583  227.959628  728.872299   
2011-03-31  226.633064  354.781917  261.361513  228.357893  728.432563   
2011-04-30  227.733077  356.310928  258.629250  229.281410  728.846720   
2011-05-31  228.338401  357.797846  256.075530  230.653098  726.936776   
2011-06-30  228.296010  358.273632  255.495152  232.110086  725.065931   
2011-07-31  227.573719  357.163665  256.454588  232.787237  721.417667   
2011-08-31  225.793626  355.201623  257.590008  232.604407  716.339714   
2011-09-30  222.844805  352.904995  258.115437  232.505657  711.875271   
2011-10-31  219.760742  350.247506  258.293736  232.541776  707.457255   
2011-11-30  218.328769  347.765940  260.017619  231.854006  704.523984   
2011-12-31  218.407507  345.920914  262.008154  230.414491  700.046947   

                    CO          CT          DE          FL          GA  \
Date                                                                     
1990-01-31  128.607770  289.087700  202.214111  133.668588  116.794322   
1990-02-28  128.817810  286.729447  203.585164  133.302517  116.293285   
1990-03-31  129.016696  283.918663  203.903611  133.217207  115.513095   
1990-04-30  129.123827  280.649292  203.811564  133.568341  115.303254   
1990-05-31  129.785821  277.504604  203.813374  134.063840  115.679836   
1990-06-30  130.736624  275.556792  203.729677  134.476896  116.010426   
1990-07-31  131.155356  274.668346  202.993615  134.870741  116.228251   
1990-08-31  131.006107  273.386466  202.119752  135.127512  116.340283   
1990-09-30  130.895365  270.451392  202.168984  134.965775  115.945907   
1990-10-31  131.308945  266.127865  202.497555  134.534458  115.113301   
1990-11-30  131.886803  262.077147  202.327781  133.849576  114.630304   
1990-12-31  132.215685  259.387008  202.174511  133.576043  114.792896   
1991-01-31  132.197914  257.946169  202.510624  134.251990  115.041044   
1991-02-28  132.513662  257.231346  203.022148  134.733158  115.117306   
1991-03-31  133.498100  256.546642  203.365790  134.624615  115.265147   
1991-04-30  134.591909  254.992512  203.839788  134.682225  115.463299   
1991-05-31  135.715084  253.103665  204.499634  135.228028  115.623617   
1991-06-30  136.761108  251.962324  205.219028  135.728434  115.643601   
1991-07-31  137.859727  251.325128  205.644088  135.400473  115.270753   
1991-08-31  139.014842  250.337387  205.214943  134.629734  114.717224   
1991-09-30  140.105338  248.859211  204.496322  134.480029  114.415288   
1991-10-31  141.113647  247.134512  204.819400  135.216867  114.417340   
1991-11-30  141.547988  245.775766  205.758617  135.844145  114.804444   
1991-12-31  142.164125  245.590236  205.919050  136.133317  115.958923   
1992-01-31  144.122483  246.286692  205.102083  136.801153  117.180634   
1992-02-29  147.371144  246.641302  204.325045  137.440939  117.218252   
1992-03-31  150.571327  245.543315  204.831843  137.342374  116.413474   
1992-04-30  152.625803  243.226897  205.834442  136.924505  116.007888   
1992-05-31  154.142783  240.780479  205.360736  136.677842  116.389447   
1992-06-30  156.218710  238.570015  203.533858  136.459852  117.204946   
...                ...         ...         ...         ...         ...   
2009-07-31  504.347190  486.057185  480.248310  329.207000  251.546002   
2009-08-31  503.227599  485.721923  477.114165  329.320247  249.452250   
2009-09-30  501.759296  484.018599  473.266220  328.394252  246.790103   
2009-10-31  498.793238  481.935787  469.706884  326.218846  243.570776   
2009-11-30  492.865835  478.857661  466.817162  322.850520  238.984725   
2009-12-31  487.245311  473.741997  463.897961  318.505387  234.311464   
2010-01-31  485.861400  468.636818  460.814279  315.343364  231.845935   
2010-02-28  488.137705  466.520979  458.230624  314.585293  231.481507   
2010-03-31  491.208936  467.842005  456.668139  314.177998  231.967909   
2010-04-30  494.095142  471.190809  456.235983  312.775250  232.999370   
2010-05-31  495.596436  474.299740  456.143315  311.033444  233.859428   
2010-06-30  492.686125  475.257519  455.031265  309.496300  232.484962   
2010-07-31  487.092831  473.150494  452.387431  306.581441  228.160428   
2010-08-31  482.284815  468.940745  449.505240  301.189057  222.240992   
2010-09-30  478.804984  463.979210  447.059688  295.407721  215.432293   
2010-10-31  475.577101  459.253419  444.779692  291.468474  209.078587   
2010-11-30  470.379569  454.944124  442.273015  287.267841  205.166126   
2010-12-31  463.377795  450.158295  438.362260  281.151603  202.669517   
2011-01-31  458.261082  445.492002  432.867127  276.067334  200.562933   
2011-02-28  457.298825  442.658391  427.272125  273.737460  199.431216   
2011-03-31  459.678450  443.726266  423.352179  273.905334  199.165803   
2011-04-30  464.074387  448.389771  422.028692  276.392219  199.335639   
2011-05-31  468.174279  453.240796  421.965507  279.344965  199.700199   
2011-06-30  470.904852  455.660678  421.399966  280.273419  199.826299   
2011-07-31  473.476905  454.127332  420.092090  279.860960  199.320828   
2011-08-31  474.042092  449.314040  417.876721  279.784364  198.022818   
2011-09-30  471.936782  443.704265  414.824247  279.924471  195.510471   
2011-10-31  468.037818  437.766809  411.619159  279.221534  191.547039   
2011-11-30  463.473084  432.229257  408.468416  277.727692  187.523833   
2011-12-31  459.916344  427.710209  405.507414  276.229422  184.153893   

               ...               VT          VA          WA          WV  \
Date           ...                                                        
1990-01-31     ...       217.615714  179.224441  225.298844   68.476763   
1990-02-28     ...       217.989644  178.921132  233.971612   68.825487   
1990-03-31     ...       218.658764  179.104137  242.490216   69.416380   
1990-04-30     ...       219.120993  180.099895  250.784574   70.283645   
1990-05-31     ...       219.041999  181.135479  258.186412   71.468265   
1990-06-30     ...       218.420345  181.679182  262.843114   72.740233   
1990-07-31     ...       217.277298  182.081678  264.978004   73.616571   
1990-08-31     ...       215.777289  181.923437  266.689162   73.738017   
1990-09-30     ...       214.375225  180.870316  267.779799   73.193561   
1990-10-31     ...       213.285112  179.380068  267.184444   72.427093   
1990-11-30     ...       212.571578  178.016837  265.960671   71.971578   
1990-12-31     ...       212.339648  177.317254  264.760104   72.069156   
1991-01-31     ...       212.170356  177.091991  264.590688   72.726148   
1991-02-28     ...       211.631852  177.003925  266.243640   73.811679   
1991-03-31     ...       210.812557  177.241935  268.700039   75.069486   
1991-04-30     ...       209.954994  177.531467  271.408978   76.336586   
1991-05-31     ...       209.030711  177.783728  274.044550   77.495046   
1991-06-30     ...       207.834843  178.282990  276.692444   78.427664   
1991-07-31     ...       206.489112  178.132894  278.600901   79.053090   
1991-08-31     ...       205.438946  177.176411  278.892911   79.489597   
1991-09-30     ...       205.019754  176.911224  279.572137   79.868670   
1991-10-31     ...       205.088699  177.555066  281.477982   80.155454   
1991-11-30     ...       205.431558  178.158835  283.612151   80.328956   
1991-12-31     ...       205.699444  178.368233  285.237687   80.411364   
1992-01-31     ...       205.467620  178.791132  285.611117   80.583663   
1992-02-29     ...       205.375110  179.947900  286.446097   81.169826   
1992-03-31     ...       206.225108  180.726321  288.834633   82.462066   
1992-04-30     ...       207.477299  180.104803  291.057825   84.140464   
1992-05-31     ...       208.262178  178.924480  292.959252   85.368355   
1992-06-30     ...       208.579429  178.481305  294.488039   85.913510   
...            ...              ...         ...         ...         ...   
2009-07-31     ...       504.093723  476.107270  752.663591  220.382379   
2009-08-31     ...       503.211488  475.128846  749.124619  219.506167   
2009-09-30     ...       500.158505  473.615691  746.242218  218.243776   
2009-10-31     ...       496.546726  473.525220  740.532849  217.079919   
2009-11-30     ...       494.406546  472.693238  731.949508  216.081579   
2009-12-31     ...       493.847376  469.144246  722.307403  215.081834   
2010-01-31     ...       494.452218  465.377493  715.957170  213.960893   
2010-02-28     ...       495.796919  464.793368  716.936336  213.054440   
2010-03-31     ...       497.369920  467.289170  721.227114  213.193704   
2010-04-30     ...       498.532229  471.242369  724.773295  214.563964   
2010-05-31     ...       498.705952  475.136111  724.203419  216.591760   
2010-06-30     ...       498.349295  475.415101  717.887677  218.270763   
2010-07-31     ...       497.466287  470.773588  708.653922  218.756256   
2010-08-31     ...       495.586339  463.680428  699.691019  218.432001   
2010-09-30     ...       493.168391  457.154060  690.292959  218.166165   
2010-10-31     ...       491.612911  452.508459  678.571544  217.733162   
2010-11-30     ...       491.364606  448.371437  666.697181  216.480311   
2010-12-31     ...       491.570433  443.134817  656.515134  214.452535   
2011-01-31     ...       491.409346  439.067218  649.560652  212.439522   
2011-02-28     ...       490.435483  439.365132  646.958753  211.295630   
2011-03-31     ...       489.338962  444.083716  646.457091  211.047585   
2011-04-30     ...       489.709842  451.318548  646.061000  211.329804   
2011-05-31     ...       491.713829  457.221749  645.573844  211.903585   
2011-06-30     ...       494.319082  459.331034  644.485567  212.584700   
2011-07-31     ...       496.351131  457.556954  641.611805  213.127531   
2011-08-31     ...       497.328016  454.523777  635.938834  213.464866   
2011-09-30     ...       497.228361  451.439494  629.588373  213.698078   
2011-10-31     ...       495.503326  447.712268  624.567679  213.730408   
2011-11-30     ...       492.478398  443.336347  619.017923  213.455383   
2011-12-31     ...       488.885999  438.472506  610.260669  213.033915   

                    WI          WY        M30  Unemployment Rate         GDP  \
Date                                                                           
1990-01-31  102.969030   74.740767   4.984093         -33.333333    0.000000   
1990-02-28  104.289628   75.353989   8.165429         -34.567901   -2.697505   
1990-03-31  105.932415   76.287112   8.907741         -35.802469   -2.065278   
1990-04-30  107.582128   77.735727   9.968187         -33.333333  -10.874318   
1990-05-31  108.807348   79.764564  11.134677         -33.333333    1.006296   
1990-06-30  109.861304   81.970797   7.741251         -35.802469    4.141092   
1990-07-31  110.854346   83.726014   6.468717         -32.098765    5.969284   
1990-08-31  111.285898   84.651696   7.104984         -29.629630   12.926424   
1990-09-30  111.215258   84.843449   7.953340         -27.160494   11.469666   
1990-10-31  111.211625   84.751003   7.953340         -27.160494   11.798952   
1990-11-30  111.723824   84.794877   6.150583         -23.456790    8.890704   
1990-12-31  112.237018   85.159241   2.545069         -22.222222   -4.249098   
1991-01-31  112.087446   85.916308   2.226935         -20.987654  -19.783462   
1991-02-28  112.183742   87.129308  -0.636267         -18.518519  -22.963041   
1991-03-31  113.186715   88.703629   0.742312         -16.049383  -21.904059   
1991-04-30  114.726375   90.348695   0.636267         -17.283951  -13.521772   
1991-05-31  116.526581   91.803279   0.424178         -14.814815   -8.888069   
1991-06-30  118.525808   93.022625   2.014846         -14.814815   -7.576197   
1991-07-31  120.117446   94.094165   1.590668         -16.049383   -3.732778   
1991-08-31  120.539837   95.088257  -2.014846         -14.814815   -0.418851   
1991-09-30  120.345837   95.942633  -4.453871         -14.814815   -5.426622   
1991-10-31  120.833003   96.734750  -6.044539         -13.580247   -2.829219   
1991-11-30  121.850594   97.768882  -7.635207         -13.580247   -7.586734   
1991-12-31  122.254201   99.090549  -9.862142          -9.876543  -16.696083   
1992-01-31  122.476147  100.321758 -10.604454          -9.876543  -21.935671   
1992-02-29  123.766619  101.198058  -7.104984          -8.641975  -20.133822   
1992-03-31  125.869588  101.953325  -5.196182          -8.641975  -18.616475   
1992-04-30  127.847278  102.909950  -6.150583          -8.641975  -17.976344   
1992-05-31  130.255784  104.016799  -8.059385          -6.172840  -15.144490   
1992-06-30  132.864016  105.167011  -9.756098          -3.703704  -13.408498   
...                ...         ...        ...                ...         ...   
2009-07-31  348.899154  434.439821 -44.644751          17.283951  280.985749   
2009-08-31  347.883644  432.369293 -44.962884          18.518519  280.108532   
2009-09-30  345.857774  430.215753 -46.341463          20.987654  278.248729   
2009-10-31  343.191279  428.069891 -47.507953          23.456790  292.083981   
2009-11-30  340.057695  425.622331 -48.250265          22.222222  284.905561   
2009-12-31  335.916845  423.477172 -47.720042          22.222222  283.946682   
2010-01-31  331.960788  422.333246 -46.659597          19.753086  339.564290   
2010-02-28  329.996332  422.242586 -47.083775          20.987654  345.428203   
2010-03-31  331.076397  422.889965 -47.295864          20.987654  400.850873   
2010-04-30  334.758699  423.187078 -45.917285          22.222222  382.529438   
2010-05-31  337.638540  421.973470 -48.144221          18.518519  381.046337   
2010-06-30  336.871894  419.250998 -49.734889          16.049383  379.328785   
2010-07-31  333.476426  415.952137 -51.643690          17.283951  398.756619   
2010-08-31  330.461217  412.904077 -53.022269          18.518519  399.167567   
2010-09-30  327.689922  410.500771 -53.870626          17.283951  392.592397   
2010-10-31  324.158303  408.555320 -55.143160          17.283951  401.862438   
2010-11-30  320.392278  406.812161 -54.400848          20.987654  404.399252   
2010-12-31  316.365323  405.786628 -50.053022          16.049383  395.582308   
2011-01-31  311.554269  405.727486 -49.522800          12.345679  424.667422   
2011-02-28  306.645521  406.660837 -47.507953          11.111111  440.320329   
2011-03-31  305.725303  408.585283 -48.674443           9.876543  478.011644   
2011-04-30  309.334315  411.102954 -48.674443          11.111111  465.886041   
2011-05-31  312.994262  413.453521 -50.795334          11.111111  481.241274   
2011-06-30  314.442408  415.376829 -52.173913          12.345679  475.235110   
2011-07-31  313.916668  416.487756 -51.749735          12.345679  487.684729   
2011-08-31  311.719359  415.674278 -54.718982          12.345679  498.959458   
2011-09-30  308.053861  412.951116 -56.415695          11.111111  479.060088   
2011-10-31  303.562109  409.758808 -56.839873           9.876543  488.706831   
2011-11-30  299.674448  407.690595 -57.688229           7.407407  489.170464   
2011-12-31  296.278227  406.948413 -58.006363           4.938272  478.346197   

                  sp500  
Date                     
1990-01-31   384.083446  
1990-02-28   370.529148  
1990-03-31   381.937898  
1990-04-30   381.529238  
1990-05-31   398.718477  
1990-06-30   413.152002  
1990-07-31   412.645503  
1990-08-31   370.947609  
1990-09-30   349.105552  
1990-10-31   337.312789  
1990-11-30   348.940538  
1990-12-31   368.104070  
1991-01-31   363.456417  
1991-02-28   415.823925  
1991-03-31   430.085410  
1991-04-30   440.621700  
1991-05-31   438.220498  
1991-06-30   438.648702  
1991-07-31   441.402252  
1991-08-31   454.468407  
1991-09-30   451.329180  
1991-10-31   450.880626  
1991-11-30   449.508020  
1991-12-31   453.197294  
1992-01-31   492.446218  
1992-02-29   487.435246  
1992-03-31   480.043468  
1992-04-30   480.104124  
1992-05-31   490.651409  
1992-06-30   481.339214  
...                 ...  
2009-07-31  1232.509361  
2009-08-31  1337.739875  
2009-09-30  1387.330682  
2009-10-31  1420.238622  
2009-11-30  1449.293692  
2009-12-31  1481.058916  
2010-01-31  1499.859794  
2010-02-28  1450.847135  
2010-03-31  1540.393907  
2010-04-30  1604.849970  
2010-05-31  1501.967759  
2010-06-30  1442.589846  
2010-07-31  1437.524263  
2010-08-31  1448.173465  
2010-09-30  1497.724413  
2010-10-31  1568.209825  
2010-11-30  1607.088865  
2010-12-31  1667.799229  
2011-01-31  1726.311327  
2011-02-28  1781.130331  
2011-03-31  1757.449036  
2011-04-30  1795.920481  
2011-05-31  1805.610720  
2011-06-30  1732.961108  
2011-07-31  1786.920756  
2011-08-31  1587.748260  
2011-09-30  1571.478011  
2011-10-31  1618.946511  
2011-11-30  1646.283240  
2011-12-31  1670.358528  

[264 rows x 54 columns]
                         AL        AK        AZ        AR        CA        CO  \
AL                 1.000000  0.972248  0.901313  0.994846  0.877794  0.961665   
AK                 0.972248  1.000000  0.839755  0.981834  0.855834  0.922324   
AZ                 0.901313  0.839755  1.000000  0.886004  0.958469  0.842439   
AR                 0.994846  0.981834  0.886004  1.000000  0.880304  0.969541   
CA                 0.877794  0.855834  0.958469  0.880304  1.000000  0.845729   
CO                 0.961665  0.922324  0.842439  0.969541  0.845729  1.000000   
CT                 0.927413  0.930099  0.912187  0.932475  0.968665  0.887315   
DE                 0.956129  0.962020  0.921635  0.956638  0.949543  0.890025   
FL                 0.886165  0.841722  0.991186  0.879779  0.984781  0.837102   
GA                 0.936673  0.851612  0.934123  0.925560  0.911907  0.950943   
HI                 0.855537  0.908718  0.846500  0.858748  0.881726  0.732174   
ID                 0.975911  0.937224  0.944124  0.960506  0.887515  0.896595   
IL                 0.968021  0.920568  0.953011  0.965351  0.951042  0.954803   
IN                 0.952854  0.898188  0.845900  0.957840  0.823284  0.990887   
IA                 0.978524  0.958589  0.832777  0.987277  0.830039  0.989635   
KS                 0.982530  0.959135  0.846615  0.988813  0.849322  0.991229   
KY                 0.985421  0.964379  0.854294  0.992215  0.854247  0.989465   
LA                 0.988463  0.992780  0.849955  0.992644  0.848168  0.950158   
ME                 0.947883  0.957623  0.893840  0.957056  0.948983  0.915803   
MD                 0.937989  0.942654  0.941747  0.940006  0.968285  0.868853   
MA                 0.933114  0.920517  0.884210  0.945841  0.946655  0.948335   
MI                 0.662453  0.527903  0.727268  0.661946  0.700752  0.785166   
MN                 0.947712  0.901407  0.917825  0.952563  0.939815  0.969834   
MS                 0.997675  0.976194  0.883628  0.995766  0.864236  0.966877   
MO                 0.979618  0.940972  0.913629  0.982139  0.919903  0.982837   
MT                 0.986786  0.992823  0.860994  0.989210  0.851354  0.929529   
NE                 0.969177  0.938284  0.833454  0.977666  0.826693  0.992982   
NV                 0.763133  0.687117  0.954414  0.752631  0.931771  0.724412   
NH                 0.927059  0.909983  0.905549  0.935726  0.964339  0.928523   
NJ                 0.949165  0.953139  0.921004  0.954823  0.963418  0.903884   
NM                 0.986734  0.981762  0.893786  0.983932  0.866883  0.915249   
NY                 0.951482  0.966947  0.889416  0.960215  0.941080  0.911055   
NC                 0.998010  0.968686  0.888004  0.993553  0.868353  0.970278   
ND                 0.942588  0.987992  0.757887  0.958845  0.781246  0.899611   
OH                 0.902753  0.818902  0.854874  0.904971  0.832492  0.964221   
OK                 0.982931  0.986329  0.824841  0.990675  0.832788  0.964772   
OR                 0.993138  0.963844  0.933347  0.985277  0.895529  0.935175   
PA                 0.962236  0.984251  0.881186  0.968341  0.915346  0.901520   
RI                 0.900634  0.894962  0.925891  0.909432  0.987070  0.872365   
SC                 0.996810  0.969981  0.904486  0.992287  0.894171  0.966350   
SD                 0.979905  0.985952  0.817134  0.990078  0.823781  0.963586   
TN                 0.996792  0.972777  0.884444  0.996403  0.867180  0.972608   
TX                 0.980198  0.982883  0.829340  0.986890  0.847028  0.966170   
UT                 0.982496  0.942404  0.875797  0.971326  0.807257  0.929574   
VT                 0.949044  0.980304  0.864645  0.958716  0.911258  0.892279   
VA                 0.953386  0.963128  0.927210  0.959097  0.958405  0.897346   
WA                 0.986904  0.966984  0.935524  0.977613  0.917135  0.920053   
WV                 0.987465  0.992558  0.850917  0.994293  0.848311  0.951458   
WI                 0.984120  0.947880  0.898546  0.988203  0.895063  0.987347   
WY                 0.976964  0.995386  0.835989  0.981145  0.835664  0.915765   
M30               -0.797310 -0.850842 -0.569351 -0.831055 -0.620295 -0.825280   
Unemployment Rate  0.065500  0.259508 -0.190969  0.104737 -0.027545  0.016565   
GDP                0.655117  0.778482  0.392354  0.681297  0.410782  0.565033   
sp500              0.806501  0.731637  0.709411  0.797588  0.644640  0.848498   

                         CT        DE        FL        GA    ...           VT  \
AL                 0.927413  0.956129  0.886165  0.936673    ...     0.949044   
AK                 0.930099  0.962020  0.841722  0.851612    ...     0.980304   
AZ                 0.912187  0.921635  0.991186  0.934123    ...     0.864645   
AR                 0.932475  0.956638  0.879779  0.925560    ...     0.958716   
CA                 0.968665  0.949543  0.984781  0.911907    ...     0.911258   
CO                 0.887315  0.890025  0.837102  0.950943    ...     0.892279   
CT                 1.000000  0.987958  0.936659  0.901775    ...     0.976405   
DE                 0.987958  1.000000  0.934164  0.893517    ...     0.988893   
FL                 0.936659  0.934164  1.000000  0.923395    ...     0.881727   
GA                 0.901775  0.893517  0.923395  1.000000    ...     0.852895   
HI                 0.923939  0.953482  0.866759  0.731973    ...     0.949391   
ID                 0.909216  0.951658  0.921125  0.916903    ...     0.922627   
IL                 0.955181  0.957013  0.954210  0.980930    ...     0.927400   
IN                 0.848766  0.858876  0.831355  0.952096    ...     0.852538   
IA                 0.888811  0.907697  0.824395  0.921670    ...     0.918395   
KS                 0.907795  0.921078  0.839838  0.934458    ...     0.928758   
KY                 0.909524  0.926020  0.847547  0.933081    ...     0.932681   
LA                 0.920355  0.951678  0.842100  0.886105    ...     0.965118   
ME                 0.994534  0.989171  0.916011  0.902645    ...     0.988092   
MD                 0.985687  0.995004  0.957748  0.889211    ...     0.976370   
MA                 0.976297  0.953043  0.909195  0.938689    ...     0.948096   
MI                 0.614746  0.570647  0.721075  0.858850    ...     0.513612   
MN                 0.946273  0.931943  0.927594  0.981201    ...     0.910412   
MS                 0.920495  0.948221  0.868661  0.928178    ...     0.948451   
MO                 0.946439  0.948061  0.913997  0.973923    ...     0.934609   
MT                 0.921411  0.960274  0.852352  0.874500    ...     0.968563   
NE                 0.873584  0.888560  0.824052  0.931884    ...     0.894641   
NV                 0.827930  0.816814  0.963508  0.867151    ...     0.736367   
NH                 0.986063  0.961563  0.930488  0.940021    ...     0.948629   
NJ                 0.995753  0.995700  0.940640  0.907057    ...     0.985366   
NM                 0.920839  0.963540  0.880232  0.883672    ...     0.960221   
NY                 0.991709  0.992490  0.909957  0.891223    ...     0.993861   
NC                 0.923605  0.947834  0.872320  0.940155    ...     0.944262   
ND                 0.882541  0.918258  0.759174  0.788444    ...     0.956896   
OH                 0.820778  0.813734  0.844847  0.967593    ...     0.786612   
OK                 0.911535  0.936594  0.819442  0.887852    ...     0.955488   
OR                 0.926912  0.961709  0.916110  0.931532    ...     0.944424   
PA                 0.975657  0.992788  0.893650  0.869791    ...     0.997688   
RI                 0.989790  0.970839  0.958225  0.906863    ...     0.947678   
SC                 0.943761  0.963039  0.893685  0.946140    ...     0.956612   
SD                 0.902737  0.930228  0.812016  0.880184    ...     0.951134   
TN                 0.920452  0.944919  0.870607  0.934304    ...     0.944884   
TX                 0.926302  0.943846  0.826984  0.896141    ...     0.962147   
UT                 0.855153  0.904169  0.841024  0.903217    ...     0.894220   
VT                 0.976405  0.988893  0.881727  0.852895    ...     1.000000   
VA                 0.987417  0.996473  0.942727  0.894862    ...     0.987849   
WA                 0.954050  0.981974  0.925282  0.924487    ...     0.965352   
WV                 0.916822  0.949615  0.844202  0.885027    ...     0.962506   
WI                 0.926282  0.937363  0.894911  0.963280    ...     0.927684   
WY                 0.918046  0.956610  0.829542  0.849588    ...     0.972717   
M30               -0.709807 -0.740659 -0.587410 -0.669260    ...    -0.790073   
Unemployment Rate  0.141737  0.164770 -0.129718 -0.189638    ...     0.267513   
GDP                0.565723  0.633193  0.385716  0.372279    ...     0.719720   
sp500              0.651013  0.665965  0.665314  0.819855    ...     0.662296   

                         VA        WA        WV        WI        WY       M30  \
AL                 0.953386  0.986904  0.987465  0.984120  0.976964 -0.797310   
AK                 0.963128  0.966984  0.992558  0.947880  0.995386 -0.850842   
AZ                 0.927210  0.935524  0.850917  0.898546  0.835989 -0.569351   
AR                 0.959097  0.977613  0.994293  0.988203  0.981145 -0.831055   
CA                 0.958405  0.917135  0.848311  0.895063  0.835664 -0.620295   
CO                 0.897346  0.920053  0.951458  0.987347  0.915765 -0.825280   
CT                 0.987417  0.954050  0.916822  0.926282  0.918046 -0.709807   
DE                 0.996473  0.981974  0.949615  0.937363  0.956610 -0.740659   
FL                 0.942727  0.925282  0.844202  0.894911  0.829542 -0.587410   
GA                 0.894862  0.924487  0.885027  0.963280  0.849588 -0.669260   
HI                 0.948807  0.914514  0.869096  0.807439  0.903319 -0.659327   
ID                 0.945794  0.987705  0.948901  0.945174  0.948342 -0.707159   
IL                 0.959249  0.968445  0.937201  0.983594  0.914798 -0.735021   
IN                 0.869022  0.905159  0.937052  0.981733  0.893036 -0.806798   
IA                 0.913069  0.939311  0.981238  0.987052  0.955044 -0.861924   
KS                 0.924423  0.948066  0.980132  0.989754  0.956072 -0.845867   
KY                 0.930170  0.952847  0.984583  0.991722  0.960786 -0.847308   
LA                 0.951438  0.972536  0.997860  0.966847  0.993683 -0.845320   
ME                 0.989495  0.961735  0.947237  0.947128  0.945849 -0.770909   
MD                 0.996230  0.972332  0.928606  0.924123  0.933631 -0.710475   
MA                 0.958855  0.929934  0.923579  0.960670  0.902919 -0.768205   
MI                 0.592191  0.614596  0.594078  0.760844  0.508630 -0.472264   
MN                 0.938415  0.935976  0.920979  0.981708  0.888899 -0.752126   
MS                 0.947120  0.979835  0.990927  0.982207  0.979848 -0.811606   
MO                 0.951944  0.963186  0.960102  0.996152  0.934577 -0.787246   
MT                 0.957461  0.979438  0.995284  0.958768  0.997257 -0.829565   
NE                 0.896646  0.924572  0.966804  0.986544  0.932541 -0.851758   
NV                 0.829198  0.810042  0.700662  0.793200  0.672082 -0.430431   
NH                 0.965399  0.934582  0.910250  0.949606  0.894230 -0.729500   
NJ                 0.996084  0.970798  0.942624  0.945160  0.942666 -0.747883   
NM                 0.960630  0.987311  0.985699  0.954006  0.988790 -0.788611   
NY                 0.992010  0.967003  0.954239  0.944638  0.956497 -0.778476   
NC                 0.944868  0.979939  0.985778  0.984955  0.973170 -0.800866   
ND                 0.920426  0.924356  0.980350  0.912821  0.985954 -0.874971   
OH                 0.826427  0.857117  0.866580  0.955514  0.809073 -0.728561   
OK                 0.937446  0.957184  0.995005  0.971057  0.985344 -0.864117   
OR                 0.960379  0.993172  0.976041  0.971639  0.969039 -0.762628   
PA                 0.990712  0.977487  0.970316  0.940383  0.978784 -0.792767   
RI                 0.974990  0.929986  0.884730  0.917474  0.877042 -0.688958   
SC                 0.959946  0.986914  0.982625  0.984650  0.971977 -0.789404   
SD                 0.932207  0.951340  0.995390  0.969794  0.984556 -0.871814   
TN                 0.945742  0.976077  0.989862  0.986360  0.975127 -0.813771   
TX                 0.943248  0.959221  0.988692  0.969557  0.981153 -0.851554   
UT                 0.900576  0.963292  0.967007  0.953006  0.958127 -0.764718   
VT                 0.987849  0.965352  0.962506  0.927684  0.972717 -0.790073   
VA                 1.000000  0.976952  0.951017  0.941690  0.952806 -0.750786   
WA                 0.976952  1.000000  0.969563  0.960404  0.970924 -0.744867   
WV                 0.951017  0.969563  1.000000  0.970520  0.992151 -0.852721   
WI                 0.941690  0.960404  0.970520  1.000000  0.942939 -0.814264   
WY                 0.952806  0.970924  0.992151  0.942939  1.000000 -0.834532   
M30               -0.750786 -0.744867 -0.852721 -0.814264 -0.834532  1.000000   
Unemployment Rate  0.152309  0.073489  0.177974  0.016885  0.242474 -0.395650   
GDP                0.636894  0.638049  0.746151  0.575477  0.785140 -0.714982   
sp500              0.681157  0.752158  0.783310  0.816910  0.731228 -0.625544   

                   Unemployment Rate       GDP     sp500  
AL                          0.065500  0.655117  0.806501  
AK                          0.259508  0.778482  0.731637  
AZ                         -0.190969  0.392354  0.709411  
AR                          0.104737  0.681297  0.797588  
CA                         -0.027545  0.410782  0.644640  
CO                          0.016565  0.565033  0.848498  
CT                          0.141737  0.565723  0.651013  
DE                          0.164770  0.633193  0.665965  
FL                         -0.129718  0.385716  0.665314  
GA                         -0.189638  0.372279  0.819855  
HI                          0.301879  0.689413  0.488438  
ID                         -0.007940  0.599021  0.741995  
IL                         -0.046626  0.487301  0.769850  
IN                         -0.068646  0.534491  0.879861  
IA                          0.091237  0.661483  0.841155  
KS                          0.085274  0.645852  0.837544  
KY                          0.085919  0.654026  0.835862  
LA                          0.184485  0.748575  0.787402  
ME                          0.179302  0.621913  0.682775  
MD                          0.123324  0.596661  0.647513  
MA                          0.091412  0.526428  0.726952  
MI                         -0.491325 -0.011666  0.753685  
MN                         -0.040253  0.457557  0.781248  
MS                          0.080943  0.680324  0.821939  
MO                          0.006792  0.547867  0.806671  
MT                          0.192459  0.750323  0.746240  
NE                          0.038597  0.619189  0.862313  
NV                         -0.322651  0.170542  0.594835  
NH                          0.067029  0.500904  0.702320  
NJ                          0.149510  0.601192  0.668902  
NM                          0.132630  0.720879  0.743091  
NY                          0.208205  0.648445  0.675365  
NC                          0.062189  0.653461  0.822457  
ND                          0.333685  0.847905  0.720670  
OH                         -0.197601  0.367011  0.854509  
OK                          0.196244  0.738536  0.796280  
OR                          0.027192  0.639242  0.784327  
PA                          0.240424  0.708425  0.677204  
RI                          0.079747  0.483362  0.626661  
SC                          0.067476  0.637508  0.808847  
SD                          0.197961  0.746653  0.793949  
TN                          0.064934  0.671656  0.831366  
TX                          0.199804  0.719496  0.788760  
UT                         -0.003101  0.670763  0.824106  
VT                          0.267513  0.719720  0.662296  
VA                          0.152309  0.636894  0.681157  
WA                          0.073489  0.638049  0.752158  
WV                          0.177974  0.746151  0.783310  
WI                          0.016885  0.575477  0.816910  
WY                          0.242474  0.785140  0.731228  
M30                        -0.395650 -0.714982 -0.625544  
Unemployment Rate           1.000000  0.551874 -0.262561  
GDP                         0.551874  1.000000  0.469914  
sp500                      -0.262561  0.469914  1.000000  

[54 rows x 54 columns]

In [33]:
HPI.to_pickle("./data/HPI.pickle");

In [ ]: