bsolomon1124/pyfinance

Testing... some suggestions

rsvp opened this issue · 2 comments

rsvp commented

hi Brad, just looked through your options pricing module.
It might be helpful in general to add tests for your various
functions. This assures the user that e.g. the condor
is written correctly for a specific inputs, and also serves
as demonstrated snippets of code.

Check out https://doc.pytest.org -- good starting point.

As you write the tests, the skeleton for documentation will
emerge. When you modify code, the tests will assure you
that everything works as intended. Take care!

Added testing for 2 of 5 modules @rsvp. Newer version should be backwards-compatible.

rsvp commented

@bsolomon1124 hi Brad, nice to see the computational results
for the spreads being tested against dependable sources:

If the spreads are correctly priced, then their components are likely to be also correct
(given the assumptions of the underlying model), thus increasing confidence in usage!