Skip to main content

Table 10 The 60 financial and economical features of the raw data

From: Predicting the daily return direction of the stock market using hybrid machine learning algorithms

Group

Name

Description

Source/Calculation

 

Date_SPY

trading dates considered

finance.yahoo.com

Close_SPY

closing prices of SPY on the trading days

finance.yahoo.com

SPY return in current and three previous days

 

SPYt

The return of the SPDR S&P 500 ETF (SPY) in day t.

finance.yahoo.com / (p(t) - p(t-1))/p(t-1)

SPYt1

The return of the SPY in day t-1.

finance.yahoo.com / (p(t-1) - p(t-2))/p(t-2)

SPYt2

The return of the SPY in day t-2.

finance.yahoo.com / (p(t-2) - p(t-3))/p(t-3)

SPYt3

The return of the SPY in day t-3.

finance.yahoo.com / (p(t-3) - p(t-4))/p(t-4)

Relative difference in percentage of the SPY return

 

RDP5

The 5-day relative difference in percentage of the SPY.

(p(t) - p(t-5))/p(t-5) * 100

RDP10

The 10-day relative difference in percentage of the SPY.

(p(t) - p(t-10))/p(t-10) * 100

RDP15

The 15-day relative difference in percentage of the SPY.

(p(t) - p(t-15))/p(t-15) * 100

RDP20

The 20-day relative difference in percentage of the SPY.

(p(t) - p(t-20))/p(t-20) * 100

Exponential moving averages of the SPY return

 

EMA10

The 10-day exponential moving average of the SPY.

p(t) * (2/(10+1)) + EMA10 (t-1) * (1-2/(10+1))

EMA20

The 20-day exponential moving average of the SPY.

p(t) * (2/(20+1)) + EMA20 (t-1) * (1-2/(20+1))

EMA50

The 50-day exponential moving average of the SPY.

p(t) * (2/(50+1)) + EMA50 (t-1) * (1-2/(50+1))

EMA200

The 200-day exponential moving average of the SPY.

p(t) * (2/(200+1)) + EMA200 (t-1) * (1-2/(200+1))

T-bill rates (in day t)

 

T1

1-month T-bill rate, secondary market, business days, discount basis.

H. 15 Release - Federal Reserve Board of Governors (https://research.stlouisfed.org/fred2/series/DGS5/downloaddata)

T3

3-month T-bill rate, secondary market, business days, discount basis.

H. 15 Release - Federal Reserve Board of Governors (https://research.stlouisfed.org/fred2/series/DGS5/downloaddata)

T6

6-month T-bill rate, secondary market, business days, discount basis.

H. 15 Release - Federal Reserve Board of Governors (https://research.stlouisfed.org/fred2/series/DGS5/downloaddata)

T60

5-year T-bill constant maturity rate, secondary market, business days.

H. 15 Release - Federal Reserve Board of Governors (https://research.stlouisfed.org/fred2/series/DGS5/downloaddata)

T120

10-year T-bill constant maturity rate, secondary market, business days.

H. 15 Release - Federal Reserve Board of Governors(https://research.stlouisfed.org/fred2/series/DGS10?catbc=1&utm_expid=19978471-Srcl7QpGidAURO4vg_Q.1&utm_referrer=https%3A%2F%2Fresearch.stlouisfed.org%2Ffred2%2Frelease%3Frid%3D18)

Certificate of deposit rates (in day t)

 

CD1

Average rate on 1-month neogtiable certificates of deposit (secondary market), quoted on an investment basis.

H. 15 Release - Federal Reserve Board of Governors

CD3

Average rate on 3-month neogtiable certificates of deposit (secondary market), quoted on an investment basis.

H. 15 Release - Federal Reserve Board of Governors

CD6

Average rate on 6-month neogtiable certificates of deposit (secondary market), quoted on an investment basis.

H. 15 Release - Federal Reserve Board of Governors

Financial and economical indicators (in day t)

 

Oil

Relative change in the price of the crude oil (Cushing, OK WTI Spot Price FOB (dollars per barrel)).

Energy Inormation Administration, http://tonto.eia.doe.gov/dnav/pet/hist/rwtcd.htm (work on cleaning the price column first using the SPY dates as control, then cal the relative change)

Gold

Relative change in the gold price

usagold.com (use FireFox to Select All, then copy and paste to an Excel file) (the dates used by USAGOLD are not matching with the SPY prices from yahoo.finance. For example, after 06/09/2004. We still clean/make up/delete the gold prices based on the dates of SPY prices from finance.yahoo.com. Use the same procedure in the whole data set: Take the average of the two closest data with the missing one in the middle. Then delete the mismatching one, and cal the relatvie difference as before. Another example, the data in 2011, all Friday's prices were recorded as Sunday's prices, so we estimated Friday's prices with the average of Thursday and Sunday's prices. Then deleted Sunday's prices. If there are n continuous values missing, then take the average of the n available values on each side of these n missing values, use the average for all n missing values)

CTB3M

Change in the market yield on US Treasury securities at 3-month constant maturity, quoted on investment basis.

H. 15 Release - Federal Reserve Board of Governors

CTB6M

Change in the market yield on US Treasury securities at 6-month constant maturity, quoted on investment basis.

H. 15 Release - Federal Reserve Board of Governors

CTB1Y

Change in the market yield on US Treasury securities at 1-year constant maturity, quoted on investment basis.

H. 15 Release - Federal Reserve Board of Governors

CTB5Y

Change in the market yield on US Treasury securities at 5-year constant maturity, quoted on investment basis.

H. 15 Release - Federal Reserve Board of Governors

CTB10Y

Change in the market yield on US Treasury securities at 10-year constant maturity, quoted on investment basis.

H. 15 Release - Federal Reserve Board of Governors

AAA

Change in the Moody's yield on seasoned corporate bonds - all industries, Aaa.

H. 15 Release - Federal Reserve Board of Governors

BAA

Change in the Moody's yield on seasoned corporate bonds - all industries, Baa.

H. 15 Release - Federal Reserve Board of Governors

The term and default spreads

 

TE1

Term spread between T120 and T1.

TE1 = T120 - T1

TE2

Term spread between T120 and T3.

TE2 = T120 - T3

TE3

Term spread between T120 and T6.

TE3 = T120 - T6

TE5

Term spread between T3 and T1.

TE5 = T3 - T1

TE6

Term spread between T6 and T1.

TE6 = T6 - T1

DE1

Default spread between BAA and AAA.

DE1 = BAA - AAA

DE2

Default spread between BAA and T120.

DE2 = BAA - T120

DE4

Default spread between BAA and T6.

DE4 = BAA - T6

DE5

Default spread between BAA and T3.

DE5 = BAA - T3

DE6

Default spread between BAA and T1.

DE6 = BAA - T1

DE7

Default spread between CD6 and T6.

DE7 = CD6 - T6

Exchange rate between USD and four other currencies (in day t)

 

USD_Y

Relative change in the exchange rate between US dollar and Japanese yen.

http://www.investing.com/currencies/usd-jpy-historical-data

USD_GBP

Relative change in the exchange rate between US dollar and British pound.

http://www.investing.com/currencies/gbp-usd-historical-data (then, take the opposites to the changes)

USD_CAD

Relative change in the exchange rate between US dollar and Canadian dollar.

http://www.investing.com/currencies/usd-cad-historical-data

USD_CNY

Relative change in the exchange rate between US dollar and Chinese Yuan (Renminbi).

http://www.investing.com/currencies/usd-cny-historical-data

The return of the other seven world major indices (in day t)

 

HSI

Hang Seng index return in day t.

finance.yahoo.com

SSE Composite

Shang Hai Stock Exchange Composite index return in day t.

finance.yahoo.com

FCHI

CAC 40 index return in day t.

finance.yahoo.com

FTSE

FTSE 100 index return in day t.

finance.yahoo.com

GDAXI

DAX index return in day t.

finance.yahoo.com

DJI

Dow Jones Industrial Average index return in day t.

finance.yahoo.com(no download function for this one); measuringworth.com/datasets/DJA/result.php

IXIC

NASDAQ Composite index return in day t.

finance.yahoo.com

SPY trading volume (in day t)

V

Relative change in the trading volume of S&P 500 index (SPY)

finance.yahoo.com

The return of the eight big companies in S&P 500 (in day t)

 

AAPL

Apple Inc stock return in day t.

finance.yahoo.com

MSFT

Microsoft stock return in day t.

finance.yahoo.com

XOM

Exxon Mobil stock return in day t.

finance.yahoo.com

GE

General Electric stock return in day t.

finance.yahoo.com

JNJ

Johnson and Johnson stock return in day t.

finance.yahoo.com

WFC

Wells Fargo stock return in day t.

finance.yahoo.com

AMZN

Amazon.com Inc stock return in day t.

finance.yahoo.com

JPM

JPMorgan Chase & Co stock return in day t.

finance.yahoo.com