Quick question. I first defined a function prc_chgd that ultimately gives me a variable ans, but as an intermediate step gives me the variable price. Now, I want to write a subsequent function hdg, that using the same order of inputs, used the intermediate variable price to calculate something else. Unfortunately, I don't know how :S
def prc_chgd(p0, ta, ya, tb, yb, cb, delta1_y, delta2_y):
price = xyz
ans = price*abc
def hedge(p0, ta, ya, tb, yb, cb, delta1_y, delta2_y):
from prc_chgd(p0, ta, ya, tb, yb, cb, delta1_y, delta2_y) import price
ans = price*xxxx
the point is that the functions are two separate excercises within a notebook assignment, and I might have to recalculate the preceding function with new inputs (in the same order though), and only choose the defined variable price for my calculation.
Thanks a bunch in advance!
hedgecalled from? You'll need to returnpricefromprc_chgdif you want it to be used elsewhere.