aa4488147ec1db9fa33fff89fd412fa4f6f962f5,QUANTAXIS/QAData/data_fq.py,,QA_data_make_hfq,#Any#Any#,75
Before Change
data = data.fillna(0)
data["preclose"] = (data["close"].shift(1) * 10 - data["fenhong"] + data["peigu"]
* data["peigujia"]) / (10 + data["peigu"] + data["songzhuangu"])
data["adj"] = (data["preclose"].shift(-1) /
data["close"]).fillna(1).cumprod()
data["open"] = data["open"] / data["adj"]
data["high"] = data["high"] / data["adj"]
data["low"] = data["low"] / data["adj"]
data["close"] = data["close"] / data["adj"]
data["preclose"] = data["preclose"] / data["adj"]
return data.query("if_trade==1").drop(["fenhong", "peigu", "peigujia", "songzhuangu"], axis=1).query("open != 0")
def QA_data_stock_to_fq(__data, type_="01"):
After Change
data = data.fillna(0)
data["preclose"] = (data["close"].shift(1) * 10 - data["fenhong"] + data["peigu"]
* data["peigujia"]) / (10 + data["peigu"] + data["songzhuangu"])
data["adj"]= (data["close"]/data["preclose"].shift(-1)).cumprod().shift(1).fillna(1)
data["open"] = data["open"] * data["adj"]
data["high"] = data["high"] * data["adj"]
data["low"] = data["low"] * data["adj"]
data["close"] = data["close"] * data["adj"]
data["preclose"] = data["preclose"] * data["adj"]
return data.query("if_trade==1").drop(["fenhong", "peigu", "peigujia", "songzhuangu"], axis=1).query("open != 0")
def QA_data_stock_to_fq(__data, type_="01"):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 27
Instances
Project Name: QUANTAXIS/QUANTAXIS
Commit Name: aa4488147ec1db9fa33fff89fd412fa4f6f962f5
Time: 2018-01-08
Author: yutiansut@qq.com
File Name: QUANTAXIS/QAData/data_fq.py
Class Name:
Method Name: QA_data_make_hfq
Project Name: QUANTAXIS/QUANTAXIS
Commit Name: 9717fb7bdf93f36b98fbd950d1259aa76b4e7945
Time: 2018-01-08
Author: yutiansut@qq.com
File Name: QUANTAXIS/QAData/data_fq.py
Class Name:
Method Name: QA_data_make_hfq
Project Name: QUANTAXIS/QUANTAXIS
Commit Name: 6a71c6576b4dbe6bf826f00c6deb33b2f2138164
Time: 2018-01-08
Author: yutiansut@qq.com
File Name: QUANTAXIS/QAData/data_fq.py
Class Name:
Method Name: QA_data_make_hfq