私が読んでいるコードは@batch_transform
. シンボルは何をし@
ますか?それはipython固有ですか?
from zipline.transforms import batch_transform
from scipy import stats
@batch_transform
def regression_transform(data):
pep_price = data.price['PEP']
ko_price = data.price['KO']
slope, intercept, _, _, _ = stats.linregress(pep_price, ko_price)
return intercept, slope