PREDICTIVE ANALYTICS FOR EQUITIES – PART 4

Split Train & Test and Normalization

Create overall random Train and Test split.

We leave P_PRICE out as a predictor given it is already involved in many of the ratio features. Also as a value on its own (i.e., not in a ratio like Price to Earnings), it would not likely make a good predictor given the intuition is to use price in a relative manner such as in a ratio or in terms of change, like for momentum of trailing six months returns (P_PRICE_RETURNS_PR).

Out[85]:
['P_PRICE_RETURNS',
'P_PRICE_RETURNS_PR',
'FF_EPS',
'FF_BPS',
'FF_PE',
'FF_PBK',
'FF_PSALES',
'FF_ENTRPR_VAL_SALES',
'FF_ENTRPR_VAL_EBITDA_OPER',
'FF_FREE_PS_CF',
'FE_RATING',
'FF_ROE',
'FF_ROA',
'FG_DIV_YLD',
'FG_EPS_LTG',
'FF_EPS_BASIC_GR']

Normalize (i.e., standardize) features and response.

Note we are not so concerned with outliers as our data set consists of 30 well established stocks collected from a well estblished source, namely FactSet, and although we don’t want to ignore any out of character data, it may have real meaning we want to model. That said, with more time, we would still do outlier analysis as part of the comprehensive data science process, as it could reveal some undetected data collection issue.

standardized (train) P_PRICE_RETURNS mean 3.53509109111e-16 std 1.0
standardized (train) P_PRICE_RETURNS_PR mean 3.96155771327e-16 std 1.0
standardized (train) FF_EPS mean 3.19268421224e-15 std 1.0
standardized (train) FF_BPS mean 1.23005662093e-16 std 1.0
standardized (train) FF_PE mean 5.64803935543e-17 std 1.0
standardized (train) FF_PBK mean -6.11349595286e-16 std 1.0
standardized (train) FF_PSALES mean 1.41527001758e-15 std 1.0
standardized (train) FF_ENTRPR_VAL_SALES mean 1.25619312131e-15 std 1.0
standardized (train) FF_ENTRPR_VAL_EBITDA_OPER mean 1.12775749938e-15 std 1.0
standardized (train) FF_FREE_PS_CF mean 4.91868450731e-16 std 1.0
standardized (train) FE_RATING mean 1.25770646102e-14 std 1.0
standardized (train) FF_ROE mean -5.81545393851e-16 std 1.0
standardized (train) FF_ROA mean 2.14933890791e-15 std 1.0
standardized (train) FG_DIV_YLD mean 1.73432696775e-15 std 1.0
standardized (train) FG_EPS_LTG mean 3.4043094622e-15 std 1.0
standardized (train) FF_EPS_BASIC_GR mean 6.30800526452e-16 std 1.0

standardized (train) P_PRICE_RETURNS mean 3.53509109111e-16 std 1.0
standardized (train) P_PRICE_RETURNS_PR mean 3.96155771327e-16 std 1.0
standardized (train) FF_EPS mean 3.19268421224e-15 std 1.0
standardized (train) FF_BPS mean 1.23005662093e-16 std 1.0
standardized (train) FF_PE mean 5.64803935543e-17 std 1.0
standardized (train) FF_PBK mean -6.11349595286e-16 std 1.0
standardized (train) FF_PSALES mean 1.41527001758e-15 std 1.0
standardized (train) FF_ENTRPR_VAL_SALES mean 1.25619312131e-15 std 1.0
standardized (train) FF_ENTRPR_VAL_EBITDA_OPER mean 1.12775749938e-15 std 1.0
standardized (train) FF_FREE_PS_CF mean 4.91868450731e-16 std 1.0
standardized (train) FE_RATING mean 1.25770646102e-14 std 1.0
standardized (train) FF_ROE mean -5.81545393851e-16 std 1.0
standardized (train) FF_ROA mean 2.14933890791e-15 std 1.0
standardized (train) FG_DIV_YLD mean 1.73432696775e-15 std 1.0
standardized (train) FG_EPS_LTG mean 3.4043094622e-15 std 1.0
standardized (train) FF_EPS_BASIC_GR mean 6.30800526452e-16 std 1.0

<< Part 3    Part 5 >>