Избранные комментарии трейдера ch5oh
Public Function bTheoDelta(ByVal F As Double, ByVal S As Double, ByVal T As Double, _
ByVal sig As Double, ByVal bc As Double, ByVal bp As Double, ByVal bk As Double, ByVal Tip As Boolean) As Double
Dim cc As Double, cp As Double, pp As Double, pc As Double
cc = TheoValue(F, S, T, sig, bc, True)
cp = TheoValue(F, S, T, sig, bp, True)
pc = TheoValue(F, S, T, sig, bc, False)
pp = TheoValue(F, S, T, sig, bp, False)
Dim ccDelta As Double, cpDelta As Double, pcDelta As Double, ppDelta As Double
ccDelta = TheoDelta(F, S, T, sig, bc, bk, True)
cpDelta = TheoDelta(F, S, T, sig, bp, bk, True)
pcDelta = ccDelta — 1
ppDelta = cpDelta — 1
If Tip = True Then bTheoDelta = ccDelta * pc / (cc + pc) + cpDelta * cc / (cc + pc)
If Tip = False Then bTheoDelta = ppDelta * cp / (pp + cp) + pcDelta * pp / (pp + cp)
End Function
Приведенные формулы используются только для опционов “вне денег”
export_graphviz(model.estimators_[1], out_file=str(year+N_)+'tree.dot',
feature_names = list(X_train.columns.values),
# class_names = (target_names),
# class_names = list(target.columns.values),
rounded = True, proportion = False,
# feature_names = True,
precision = 2, filled = True)
и визуализацию дереьев там перебираю в model.estimators_[1], меняя число в квадратных скобках