@@ -41,7 +41,7 @@ def setUp(self):
4141 self .flat_forward2 = FlatForward (self .todays_date , 0.04 , self .dc )
4242 self .yield1 = RelinkableYieldTermStructureHandle (self .flat_forward )
4343 self .yield2 = RelinkableYieldTermStructureHandle (self .flat_forward2 )
44- self .surface = BlackConstantVol (self .todays_date , UnitedStates (), 0.05 , Actual360 ())
44+ self .surface = BlackConstantVol (self .todays_date , UnitedStates (UnitedStates . NYSE ), 0.05 , Actual360 ())
4545 self .blackvolatilitywithatm = BlackVolatilityWithATM (self .surface ,self .spot ,self .yield1 ,self .yield2 )
4646
4747
@@ -53,7 +53,7 @@ def testSimpleInspectors(self):
5353class BlackVarianceSurfaceMoneynessSpotTest (unittest .TestCase ):
5454 def setUp (self ):
5555 """ Test consistency of Black Variance Surface Moneyness Spot"""
56- self .cal = UnitedStates ()
56+ self .cal = UnitedStates (UnitedStates . NYSE )
5757 self .spot = QuoteHandle (SimpleQuote (1.0 ))
5858 self .times = (1 ,2 ,3 )
5959 self .moneyness = (1.0 ,1.1 ,1.2 )
@@ -77,7 +77,7 @@ def setUp(self):
7777 self .flat_forward2 = FlatForward (self .todays_date , 0.04 , self .dc )
7878 self .forTS = RelinkableYieldTermStructureHandle (self .flat_forward )
7979 self .domTS = RelinkableYieldTermStructureHandle (self .flat_forward2 )
80- self .cal = UnitedStates ()
80+ self .cal = UnitedStates (UnitedStates . NYSE )
8181 self .spot = QuoteHandle (SimpleQuote (1.0 ))
8282 self .times = (1 ,2 ,3 )
8383 self .moneyness = (1.0 ,1.1 ,1.2 )
@@ -99,7 +99,7 @@ def setUp(self):
9999 self .termStructure = RelinkableYieldTermStructureHandle ()
100100 self .dayCounter = Actual360 ()
101101 self .termStructure .linkTo (FlatForward (self .today ,QuoteHandle (SimpleQuote (0.05 )), self .dayCounter ))
102- self .atmVolStructure = SwaptionVolatilityStructureHandle (ConstantSwaptionVolatility (self .today , UnitedStates (),Following ,0.2 , self .dayCounter ))
102+ self .atmVolStructure = SwaptionVolatilityStructureHandle (ConstantSwaptionVolatility (self .today , UnitedStates (UnitedStates . NYSE ),Following ,0.2 , self .dayCounter ))
103103 self .optionTenors = (Period (3 ,Months ),Period (6 ,Months ))
104104 self .swapTenors = (Period (9 ,Months ),Period (12 ,Months ))
105105 self .strikeSpreads = (0.0 ,0.05 ,0.10 )
@@ -133,7 +133,7 @@ def setUp(self):
133133 self .termStructure = RelinkableYieldTermStructureHandle ()
134134 self .dayCounter = Actual360 ()
135135 self .termStructure .linkTo (FlatForward (self .today ,QuoteHandle (SimpleQuote (0.05 )), self .dayCounter ))
136- self .atmVolStructure = SwaptionVolatilityStructureHandle (ConstantSwaptionVolatility (self .today , UnitedStates (),Following ,0.2 , self .dayCounter ))
136+ self .atmVolStructure = SwaptionVolatilityStructureHandle (ConstantSwaptionVolatility (self .today , UnitedStates (UnitedStates . NYSE ),Following ,0.2 , self .dayCounter ))
137137 self .optionTenors = (Period (3 ,Months ),Period (6 ,Months ))
138138 self .swapTenors = (Period (9 ,Months ),Period (12 ,Months ))
139139 self .strikeSpreads = (0.00 ,0.10 )
@@ -156,8 +156,8 @@ def setUp(self):
156156 """ Test consistency of Swaption Volatility Constant Spread"""
157157 self .today = Date (1 ,October ,2018 )
158158 self .dayCounter = Actual360 ()
159- self .atmVolStructure = SwaptionVolatilityStructureHandle (ConstantSwaptionVolatility (self .today , UnitedStates (),Following ,0.2 , self .dayCounter ))
160- self .atmVolStructure2 = SwaptionVolatilityStructureHandle (ConstantSwaptionVolatility (self .today , UnitedStates (),Following ,0.2 , self .dayCounter ))
159+ self .atmVolStructure = SwaptionVolatilityStructureHandle (ConstantSwaptionVolatility (self .today , UnitedStates (UnitedStates . NYSE ),Following ,0.2 , self .dayCounter ))
160+ self .atmVolStructure2 = SwaptionVolatilityStructureHandle (ConstantSwaptionVolatility (self .today , UnitedStates (UnitedStates . NYSE ),Following ,0.2 , self .dayCounter ))
161161 self .swaptionVolatilityConstantSpread = SwaptionVolatilityConstantSpread (self .atmVolStructure ,self .atmVolStructure2 )
162162
163163 def testSimpleInspectors (self ):
@@ -174,7 +174,7 @@ def setUp(self):
174174 self .rr25d = (0.0 ,0.10 ,0.20 )
175175 self .bf25d = (0.0 ,0.10 ,0.20 )
176176 self .dc = Actual360 ()
177- self .cal = UnitedStates ()
177+ self .cal = UnitedStates (UnitedStates . NYSE )
178178 self .fx = QuoteHandle (SimpleQuote (1.00 ))
179179 self .dom = RelinkableYieldTermStructureHandle ()
180180 self .dom .linkTo (FlatForward (self .refDate ,QuoteHandle (SimpleQuote (0.05 )),self .dc ))
0 commit comments