Hot answers tagged

2

The duration represents the sensitivity of the price of a financial instrument to current interest rates. Since at the rolling date the price will be equal to the face value no matter what happens to interest rates today (the interest rate will be reset at a future date), the rolling does not add any price sensitivity to an instantaneous interest rate shock. ...


1

In my opinion the best way to do it is to rebuild the orderbook from order flow. But first of all it seems very strange that you start with this data frame, usually you do not know the deletion date at creation time. This means that the data have already been process, so if you really want to be fast you should go back to this previous step and rebuild the ...


1

This is not at all a quantitative finance question and will probable be moved to StackExchange, but in any case... import pandas as pd import numpy as np df = pd.DataFrame([np.nan, np.nan, -5.0, 1.4, 0.47]) df The NaN values are expected for the first periods, since there are not enough elements to compute the rolling window. To get what you want, you ...


Only top voted, non community-wiki answers of a minimum length are eligible