A variety of business forms & data reconstructed with Pandas Dataframe to capture Financial stocks

4. If the calculation of various stock indexes, or when business processes, on an intuitive cognitive data structure, how to help the developers to make good operation, but at the same time avoid calculation errors pit.

According to data from the first node on the articles, you can see / design business and how many stock indexes.

 

A. constituent stocks of the Hang Seng stock code

Hang Seng Index constituent stocks of the Code do not = list (Hang Seng constituent stocks .keys ())

B.  stocks closing price & turnover.

Tencent = closing price of the Hang Seng Index [constituent] .iloc [turnover days, the closing price] 
Tencent Turnover = Hang Seng Index [constituent] .iloc [day market turnover, turnover]

C. Hang Seng constituent stocks closing price & turnover.

Hang Seng constituent stocks closing price s = Hang Seng Index [constituent] .iloc [turnover days, the closing price] 
Hang Seng constituent stocks of the turnover of S = Hang Seng Index [constituent] .iloc [day market turnover, turnover]

D. Hang Seng constituent stocks yesterday's closing price & turnover.

Hang Seng constituent stocks yesterday's closing price of s = Hang Seng Index [constituent] .iloc [market traded yesterday, closing price]
Hang Seng constituent stocks of the Hang Seng Index yesterday Turnover s = [constituent] .iloc [market traded yesterday, turnover]

E. Hang Seng constituent stocks of the five days the closing price

MA5 = Hang Seng Index [constituents] [2020-01-07: 2020-01-11] [closing price]

F. Hang Seng constituent stocks of the five days moving average (MA5)

MA5 = HSI [Constituents] [2020-01-07: 2020-01-11] [closing price] .mean ()

 

Guess you like

Origin www.cnblogs.com/chenkuang/p/12236369.html