Skip to content

Commit

Permalink
Fixed header
Browse files Browse the repository at this point in the history
  • Loading branch information
domokane committed Oct 8, 2020
1 parent 205ceac commit 9d6900f
Show file tree
Hide file tree
Showing 3 changed files with 76 additions and 76 deletions.
2 changes: 1 addition & 1 deletion tests/FinTestCases.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class FinTestCaseMode(Enum):
# TESTING


#globalTestCaseMode = FinTestCaseMode.SAVE_TEST_CASES
globalTestCaseMode = FinTestCaseMode.SAVE_TEST_CASES
globalTestCaseMode = FinTestCaseMode.ANALYSE_TEST_CASES
#globalTestCaseMode = FinTestCaseMode.DEBUG_TEST_CASES

Expand Down
12 changes: 6 additions & 6 deletions tests/TestFinModelRatesHW.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ def test_HullWhiteExampleTwo():

testCases.banner("Comparing option on zero coupon bond analytical vs Tree")

testCases.header("NUMTIMESTEP", "VTREE_CALL", "VTREE_PUT",
"VANAL CALL", "VANAL_PUT", "CALLDIFF", "PUTDIFF", "TIME")
testCases.header("NUMTIMESTEP", "TIME", "VTREE_CALL", "VTREE_PUT",
"VANAL CALL", "VANAL_PUT", "CALLDIFF", "PUTDIFF")

for numTimeSteps in numStepsList:

Expand All @@ -108,8 +108,8 @@ def test_HullWhiteExampleTwo():
diffC = vTreeCall - vAnal['call']
diffP = vTreePut - vAnal['put']

testCases.print(numTimeSteps, vTreeCall, vAnal['call'],
vTreePut, vAnal['put'], diffC, diffP, period)
testCases.print(numTimeSteps, period, vTreeCall, vAnal['call'],
vTreePut, vAnal['put'], diffC, diffP)

# plt.plot(numStepsList, treeVector)
# plt.plot(numStepsList, analVector)
Expand Down Expand Up @@ -173,7 +173,7 @@ def test_HullWhiteBondOption():

testCases.banner("Pricing bond option on tree that goes to bond maturity and one using european bond option tree that goes to expiry.")

testCases.header("NUMSTEPS", "EXPIRY_ONLY", "EXPIRY_TREE", "JAMSHIDIAN", "TIME")
testCases.header("NUMSTEPS", "TIME", "EXPIRY_ONLY", "EXPIRY_TREE", "JAMSHIDIAN")

for numTimeSteps in numStepsList:

Expand All @@ -195,7 +195,7 @@ def test_HullWhiteBondOption():
end = time.time()
period = end-start

testCases.print(numTimeSteps, v1, v2, vJam, period)
testCases.print(numTimeSteps, period, v1, v2, vJam)

# plt.plot(numStepsList, treeVector)

Expand Down
Loading

0 comments on commit 9d6900f

Please sign in to comment.