# AI For Trading:Alpha Factors (60)

## Intro

Efficient Market hypothesis and Arbitrage opportunities. 有效的市场假设和套利机会。

Alpha factors: Signals for relative performance of stocks.
Alpha factors are tools operating on data that give us signals about how stocks may perform relative to one another.
Alpha因素是对数据进行操作的工具，可以为我们提供有关股票相对于彼此的表现的信号。

## Install libraries

### Install python libraries for all code exercises in this lesson

Hi friends! The code exercises use zipline, and it takes 8 to 9 minutes to install the packages the first time you get to the first jupyter notebook. To help limit your wait on the installation during your first code exercise, please run the installation now in a separate tab. So, open this page in a new tab on your browser, and run the cell in the notebook below:

import sys
!{sys.executable} -m pip install -r requirements.txt

Continue on with the next video while it's installing. By the time you get to the first coding exercise, if the installation has finished, you'll be able to work on the exercise without waiting for the installation to complete. You should only have to wait once for the installation for all the coding exercises in this lesson. After that, your workspace should have all the libraries installed as you get to the later code exercises.

If you notice that you're waiting 8 to 9 minutes on the pip install code cell for every code exercise, please add a ticket to the waffleboard https://waffle.io/udacity/aitnd-issues so that I can follow up. Thanks, and happy studying!

### Troubleshooting

Note, if you're seeing a message that says "404", please click on the orange jupyter icon to see the directory of all notebooks. Then go to the bottom and choose "menu" -> "reset data".

requirements.txt

alphalens==0.3.2
colour==0.1.5
cvxpy==1.0.3
cycler==0.10.0
numpy==1.14.5
pandas==0.18.1
plotly==2.2.3
pyparsing==2.2.0
python-dateutil==2.6.1
pytz==2017.3
requests==2.18.4
scipy==1.0.0
scikit-learn==0.19.1
six==1.11.0
tqdm==4.19.5
zipline===1.2.0
graphviz==0.9

## Definition of key words

### Definition of keywords

Alpha model is an algorithm that transforms data numbers associated with each stock.
Alpha模型是一种转换与每种股票相关的数据编号的算法。

Alpha value refers to a single value for a single stock, for a single time period.
Alpha值是指单个时间段内单个股票的单个值。

Alpha vector has a number for each stock, and the number is proportional to the amount of money we wish to allocate for each stock.
Alpha矢量具有每个股票的数字，该数字与我们希望为每个股票分配的金额成比例。

Alpha factor: a time series of alpha vectors (over multiple time periods).
Alpha因子：α矢量的时间序列（在多个时间段内）。

Raw alpha factor: a version of an alpha factor before additional processing.

Stock universe: set of stocks under consideration for the portfolio.