Exemplo n.º 1
0
    def _init_atm_vol_inputs(self):
        atm_vol_input = VolCurveInput()
        atm_vol_input.name = "atm_vol"
        atm_vol_input.is_risk_input = True
        atm_vol_input.default_increment = .001
        atm_vol_input.display_name = "atm"
        atm_vol_input.display_order = 0
        atm_vol_input.vol_curve = self

        atm_strike_input = VolCurveInput()
        atm_strike_input.name = "atm_strike"
        atm_strike_input.is_risk_input = False
        atm_strike_input.default_increment = .1
        atm_strike_input.display_name = "anchor"
        atm_strike_input.display_order = 1
        atm_strike_input.vol_curve = self
    def _init_inputs(self):
        super(OCFlexibleSpline, self)._init_atm_vol_inputs()
        wide_skew_input = SkewInput()
        wide_skew_input.name = "wide_skew"
        wide_skew_input.value = 0.0
        wide_skew_input.is_risk_input = True
        wide_skew_input.default_increment = 0.001
        wide_skew_input.vol_curve = self
        wide_skew_input.display_name = "wide_skew"
        wide_skew_input.display_order = 2

        tight_skew_input = SkewInput()
        tight_skew_input.name = "tight_skew"
        tight_skew_input.value = 0.0
        tight_skew_input.is_risk_input = True
        tight_skew_input.default_increment = 0.001
        tight_skew_input.vol_curve = self
        tight_skew_input.display_name = "tight_skew"
        tight_skew_input.display_order = 3

        put_curve_input = VolCurveInput()
        put_curve_input.name = "put_curve"
        put_curve_input.value = 0.0
        put_curve_input.is_risk_input = True
        put_curve_input.default_increment = 0.001
        put_curve_input.vol_curve = self
        put_curve_input.display_name = "pc"
        put_curve_input.display_order = 4

        call_curve_input = VolCurveInput()
        call_curve_input.name = "call_curve"
        call_curve_input.value = 0.0
        call_curve_input.is_risk_input = True
        call_curve_input.default_increment = 0.001
        call_curve_input.vol_curve = self
        call_curve_input.display_name = "cc"
        call_curve_input.display_order = 5

        put_first_input = VolCurveInput()
        put_first_input.name = "put_first_diff"
        put_first_input.value = 0.0
        put_first_input.is_risk_input = True
        put_first_input.default_increment = 0.001
        put_first_input.vol_curve = self
        put_first_input.display_name = "p1d"
        put_first_input.display_order = 6

        put_second_input = VolCurveInput()
        put_second_input.name = "put_second_diff"
        put_second_input.value = 0.0
        put_second_input.is_risk_input = True
        put_second_input.default_increment = 0.001
        put_second_input.vol_curve = self
        put_second_input.display_name = "p2d"
        put_second_input.display_order = 7

        put_wing_input = VolCurveInput()
        put_wing_input.name = "put_wing_diff"
        put_wing_input.value = 0.0
        put_wing_input.is_risk_input = True
        put_wing_input.default_increment = 0.001
        put_wing_input.vol_curve = self
        put_wing_input.display_name = "pwd"
        put_wing_input.display_order = 8

        put_first_x_input = VolCurveInput()
        put_first_x_input.name = "put_first_x"
        put_first_x_input.value = 0.0
        put_first_x_input.is_risk_input = False
        put_first_x_input.default_increment = 0.1
        put_first_x_input.vol_curve = self
        put_first_x_input.display_name = "p1x"
        put_first_x_input.display_order = 9

        put_second_x_input = VolCurveInput()
        put_second_x_input.name = "put_second_x"
        put_second_x_input.value = 0.0
        put_second_x_input.is_risk_input = False
        put_second_x_input.default_increment = 0.1
        put_second_x_input.vol_curve = self
        put_second_x_input.display_name = "p2x"
        put_second_x_input.display_order = 10

        put_wing_x_input = VolCurveInput()
        put_wing_x_input.name = "put_wing_x"
        put_wing_x_input.value = 0.0
        put_wing_x_input.is_risk_input = False
        put_wing_x_input.default_increment = 0.1
        put_wing_x_input.vol_curve = self
        put_wing_x_input.display_name = "pwx"
        put_wing_x_input.display_order = 11

        call_first_input = VolCurveInput()
        call_first_input.name = "call_first_diff"
        call_first_input.value = 0.0
        call_first_input.is_risk_input = True
        call_first_input.default_increment = 0.001
        call_first_input.vol_curve = self
        call_first_input.display_name = "c1d"
        call_first_input.display_order = 12

        call_second_input = VolCurveInput()
        call_second_input.name = "call_second_diff"
        call_second_input.value = 0.0
        call_second_input.is_risk_input = True
        call_second_input.default_increment = 0.001
        call_second_input.vol_curve = self
        call_second_input.display_name = "c2d"
        call_second_input.display_order = 13

        call_wing_input = VolCurveInput()
        call_wing_input.name = "call_wing_diff"
        call_wing_input.value = 0.0
        call_wing_input.is_risk_input = True
        call_wing_input.default_increment = 0.001
        call_wing_input.vol_curve = self
        call_wing_input.display_name = "cwd"
        call_wing_input.display_order = 14

        call_first_x_input = VolCurveInput()
        call_first_x_input.name = "call_first_x"
        call_first_x_input.value = 0.0
        call_first_x_input.is_risk_input = False
        call_first_x_input.default_increment = 0.1
        call_first_x_input.vol_curve = self
        call_first_x_input.display_name = "c1x"
        call_first_x_input.display_order = 15

        call_second_x_input = VolCurveInput()
        call_second_x_input.name = "call_second_x"
        call_second_x_input.value = 0.0
        call_second_x_input.is_risk_input = False
        call_second_x_input.default_increment = 0.1
        call_second_x_input.vol_curve = self
        call_second_x_input.display_name = "c2x"
        call_second_x_input.display_order = 16

        call_wing_x_input = VolCurveInput()
        call_wing_x_input.name = "call_wing_x"
        call_wing_x_input.value = 0.0
        call_wing_x_input.is_risk_input = False
        call_wing_x_input.default_increment = 0.1
        call_wing_x_input.vol_curve = self
        call_wing_x_input.display_name = "cwx"
        call_wing_x_input.display_order = 17

        put_wing_slope_input = VolCurveInput()
        put_wing_slope_input.name = "put_wing_slope_diff"
        put_wing_slope_input.value = 0.0
        put_wing_slope_input.is_risk_input = True
        put_wing_slope_input.default_increment = -0.01
        put_wing_slope_input.vol_curve = self
        put_wing_slope_input.display_name = "pwsd"
        put_wing_slope_input.display_order = 18

        call_wing_slope_input = VolCurveInput()
        call_wing_slope_input.name = "call_wing_slope_diff"
        call_wing_slope_input.value = 0.0
        call_wing_slope_input.is_risk_input = True
        call_wing_slope_input.default_increment = 0.01
        call_wing_slope_input.vol_curve = self
        call_wing_slope_input.display_name = "cwsd"
        call_wing_slope_input.display_order = 19