Module Expr Str Expr Str Import alias identifier ImportFrom alias ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad Assign AttributeStore NameLoad attr BinOpDiv BinOpSub NameLoad NameLoad Call NameLoad AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad NameLoad BinOpAdd AttributeLoad NameLoad attr Num Assign AttributeStore NameLoad attr BinOpDiv AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list decorator_list If CompareEq NameLoad Str body ImportFrom alias Assign NameStore Call NameLoad Num Num Num BinOpDiv Num Num Num Num Num Num Num Print Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad Num Num Num BinOpDiv Num Num Num Num Num Num Num NameLoad Print Call AttributeLoad NameLoad attr
N/A N/A 
README
======
This file contains Python codes.
====
 N/A 
Price a down-and-out option by the Crank-Nicolson
method of finite differences.
 N/A numpy np FDCnEu FDCnEu FDCnDo N/A FDCnEu N/A __init__ N/A N/A self S0 K r T sigma Sbarrier Smax M N is_call N/A True N/A N/A N/A N/A N/A super FDCnDo self __init__ S0 K r T sigma Smax M N is_call N/A N/A self dS N/A N/A Smax Sbarrier N/A float N/A self M N/A N/A self boundary_conds N/A N/A np linspace Sbarrier Smax N/A N/A self M 1 N/A N/A self i_values N/A N/A self boundary_conds N/A self dS N/A N/A N/A N/A __name__ __main__ N/A FDCnDo FDCnDo N/A option N/A FDCnDo 50 50 0.1 N/A 5.0 12.0 0.4 40 100 120 500 N/A N/A N/A option price N/A option N/A FDCnDo 50 50 0.1 N/A 5.0 12.0 0.4 40 100 120 500 False N/A N/A N/A option price