instruction
stringlengths
35
27.7k
I struggle to understand why my market rates does not match my bootstrap model. So I wonder why the spread is that high between market & model. maturity | market | model 1W | 0.050640 | 0.050626 2W | 0.050670 | 0.050631 3W | 0.050720 | 0.050655 1M | 0.051021 | 0.050916 2M | 0.051391 | ...
Background: I am currently implementing a correlated Monte Carlo simulation model using Cholesky decomposition to create the sampling distribution. Question: What is the difference between creating and sampling an aggregate distribution of correlated assets and simply creating a univariate simulation based on the portf...
I have experimented a bit with the SABR model. In particular I have calibrated it on EURUSD. Obviously, as SABR is a 3 parameter model, it will not fit the 5 market quotes consisting of ATM, 25 delta butterfly, 10 delta butterfly, 25 delta risk reversal and 10 delta risk reversal perfectly. If I ignore the 10 deltas in...
We have a regular self-financing portfolio $W_t$: $$dW_t = n_t dS_t + (W_t − n_t S_t) r dt$$ Where $W_t$ is total wealth, $n_t$ is amount of stock, $S_t$ is stock price, $r$ is the risk-free rate. And the strategy is to keep the stock exposure φ constant: $φ = n_t S_t/W_t$ Currently I'm having trouble while trying to d...
I have recently struggled in interviews, for two quantitative trading positions, by producing weak answers to effectively the same (fairly basic) question. I would like to understand, from a quant perspective, what I am missing about multicollinearity. The question assumes you have a large portfolio of assets (say n=10...
In the context of pair trading, I’m trying to regress a VEC model on cointegrated pairs (and also a GARCH model on the residual of that VEC model).I would like to generate random réalisations of each pair, each realization having the same dynamic as its “real life” counterpart. What I did initially is that I generate r...
I am currently reading "Modelling single-name and multi-name credit derivatives" by Dom O'Kane but I struggle at one point that should be relatively easy. Let us consider a Zero Recovery Risky Zero Coupon Bond, that is to say a bond that pays 1 in case there is no default $\tau > T$ (that is the time of default arives ...
Let us consider a product paying an amount of 1 if default (τ<T that is the time of default arrives before maturity time), and 0 otherwise. The payoff of such a product would be given by: $$D(0, T) = E\left(\exp\left(-\int_0^\tau r(t)dt\right) \cdot \mathbb{1}_{\tau \leq T}\right)$$ Knowing that: $$\text{Probability}(T...
I've been reading about multi-armed bandits and the explore/exploit trade-off that can be solved with dynamic allocation indices such as the Gittins Index Theorem. Could this be applied to when to change investment/trading strategies assuming no cost in switching such strategies? If the fund's risk aversion is an issue...
I am trying to implement MonotoneConvex by Hagan/West by extending FittingMethod class. As per this page: https://rkapl123.github.io/QLAnnotatedSource/d7/d0d/class_quant_lib_1_1_fitted_bond_discount_curve_1_1_fitting_method.html#details I need to override discountFunction() and size(). Is this possible through QuantLib...
I have been using the CrossCurrencyBasisSwapRateHelper feature to generate a colateralised discounting curve where the collateral is in a currency different to that of the asset. However, I noticed that this feature has now been deprecated and no longer available although it is still listed under the 'Helpers' section ...
I am reading Euan's book, ‘positional option trading’ and have a question about risk reversal P/L example. Here is description 'Consider a 1-month risk reversal on a \$100 stock. The 20-delta put (91 strike) has an implied volatility of 40.8% and the 20-delta call has an implied volatility of 23.1%. We sell the put and...
I'm currently working on building a yield curve using OIS swaps. However, I'm encountering an issue with the cash flow start date that I'm struggling to understand. Here's a simplified version of my code: Reproducible example import QuantLib as ql calculation_date = ql.Date().todaysDate() #When I posted this on Quant ...
Disclaimer: I understand this is a basic question that gets addressed in most 101 textbooks. Yet I have reviewed many of them not finding a satisfactory answer. Please bear with my ignorance. Suppose a forward contract enforces the parties to exchange an asset with price $K$ at the delivery date $t=T$, and suppose the ...
In his book (chapters 9.5 to 9.7), Peter Austing argues that barrier options are insensitive to the details of the stochastic volatility model used in a LSV model, except for the level of vol of vol. In particular, he claims that there is no point in including a spot-volatility correlation in the stochastic volatility ...
I'm looking for an easy method to approximate the probability of the forward swap rate that is implied by the swpation market. One possibility would be to fit a certain model, e.g. SABR, and extract the risk neutral density. On the other hand I know from the equity case that $N(d_1)$, the delta, is used an approximatio...
We know that a market is called complete if it is possible to replicate any future payoff trading in its securities. Is there an exhaustive list of requirements that when satisfied imply market completeness? Is perfect competitiveness one of those?
This question is a follow-up of this question Fixed Payment at Default - Pricing for more clarity. Starting from the following expression of payoff: $$ D(0,T) = E(\exp(-\int_{0}^{\tau} r(t)dt) \cdot \mathbb{1}_{\{\tau \leq T\}}) $$ and knowing that $$ \text{Probability}(T \leq \tau \leq T+dT) = \lambda(T) \cdot \exp(-\...
I have been attempting to bootstrap zero rates using quantlib, but I am perplexed by the significant discrepancies between my calculated zero rates and those obtained from Bloomberg's bootstrapping process. I would greatly appreciate any insights or suggestions regarding potential reasons for this mismatch. Below is th...
I am currently working on pricing a Zero Coupon Inflation Swap using Quantlib in Python. During my analysis, I have observed that when the start date and end date of the swap coincide exactly with X years from the valuation date (e.g., a maturity date of March 31, 2041), and I'm pricing the swap on the same date (e.g.,...
For focus, let us restrict the scope of this to vanilla options-based positions/strategies. In a lot of the accounts that I've seen of those that engage in this sort of investment/trading strategy (Nassim Taleb, among others), from my view, the entry conditions seem relatively apparent, e.g., potentially, one either co...
In this preprint on arXiv (a revised version of the one discussed in a post here) we show that there are three mathematical mistakes in the option pricing framework of Black, Scholes and Merton. As a result, the option pricing formula seems incorrect even under the idealized capital market assumptions of Black and Scho...
Let $H$ be an investment strategy in a discrete price model. Proof $H$ is self financing if and only if the following holds for the portfolio process $P_t$: $$P_t = P_0 + \sum_{s=1}^tH_{s-1}(X_s-X_{s-1}) \quad \forall t=1, \dots,T$$ $\textbf{Definition:}$ $H_t$ self financing strategy $\iff (\Delta H_t)^TX_{t-1}=0\...
I have read somewhere the following statements, which I have observed to be true most of the time. I want to know how accurate they are mathematically, and how to prove them? $\Gamma > 0$ is a good position to be in, and therefore you have to pay a premium for it, on the other hand $\Gamma < 0$ is a bad position to be...
Background: I'm building a trading system for the crypto market with Python, and currently having problems on how to effectively save my real time orders/trades to disk, so that I could monitor more easily or do further analysis afterwards. The current design is as follows: For each asset I have a Strategy class, with ...
I'm reading M. S. Joshi's paper "Log-Type Models, Homogeneity of Option Prices and Convexity", and I'm having problem understanding equation 1: $$ C(S_0, K) = \int (S - K)_+ \Phi\left(\frac{S}{S_0}\right)\frac{dS}{S} $$ Could anyone help? I can only write down $$ C(S_0, K) = \int (S - K)_+ \phi(Z)dZ $$ where $S = S_0 e...
I am looking for references or practical solutions for the following. In the usual factor approach for equities with panel data regression (for each stock, explain future returns given stock characteristics), how do I add industry specific models? Example: I have 500 stocks and some stock factors are general like the s...
As part of my research for my masters thesis, I'm testing out the effectiveness of some different models in Monte Carlo simulations for path dependant options. I will be attempting a model-free approach to simulating price paths so these will simply be used as a benchmark. I want to choose a few models which are valid ...
Consider the Gamma-Ornstein-Uhlenbeck process defined in the way Barndorff-Nielsen does, but consider a different long running mean $b$ which may be bigger than zero: $$dX(t) = \eta(b - X(t))dt + dZ(t)$$ Where $$Z(t) = \sum_{n=1}^{N(t)}J_n$$ With $N(t)$ being Poisson($\lambda t$) and $J_n$ iid Exponential($k$) This has...
I've been using QuantLib for constructing a yield curve and pricing a bond. I am wondering if I'm using the correct method to create my yield term structure (yts) for the pricing process. Here is the reproducible example : import QuantLib as ql import math calculation_date = ql.Date().todaysDate() ql.Settings.instanc...
I'm currently reading this paper "Explicit SABR Calibration through Simple Expansions" by Fabien Le Floc'h and Gary Kennedy and in the 3rd part when they introduce Andersen & Brotherton-Ratcliffe expansions, I can't manage to get the same results as they get with the parameters they use when the strike is different fr...
I was wondering if there exist options or other derivatives that do not have a known closed-form analytic expression (i.e., some sort of Black-Scholes PDE) and are usually priced using Monte Carlo methods, but that could have such an expression? Specifically, I am wondering if it is possible to analyze the price data o...
I have a silly question regarding complex calculus, in which I'm a bit rusty at the moment. In F. Rouah's book The Heston Model and Its Extensions in Matlab and C# the following appears: Now evaluate the inner integral in Equation (3.32), as was done in (3.14). This produces $$\begin{align} \Pi_1 & = \dfrac{1}{2\pi}\...
I was wondering if the representation by Duffie, Pan, and Singleton (2000) is already accounting for the little Heston trap. DPS represent their 'general' discounted characteristic function as: $$ \begin{align} \psi(u,(y,v),t,T) = exp(\alpha(u,T-t) + yu + \beta(u,T-t)v), \end{align} $$ where $$ \begin{align} \b...
Suppose I have a factor model that takes in unemployment and GDP as $X_1, X_2$ respectively in estimating the fair price of asset $Y$. Say I observe that the market price of $Y$ has deviated significantly from the estimate from my model. My intuition says this signal cannot be used as a trading signal because while pri...
Let $\left(W_t\right)_{t\geq 0}$ be a Brownian motion with respect to filtration $\mathbb{F}=\left(\mathcal{F}_t\right)_{t\geq 0}$. Let $\left(\alpha_t\right)_{t\geq 0}$ be an $\mathbb{F}$-adapted stochastic process. What are necessary conditions to ensure that the stochastic integral $\int_0^t\alpha_sdW_s$ is a normal...
I am investigating various versions of nested and nonnested Fama and French factor models. Performance of the models is compared on the basis of Squared Sharpe Ratios. Bariallas et al. (2020, JFQA) propose a test that does only require the factors as inputs and does not rely on test assets. However, I can not quite get...
I'm trying to get a solution for the foreign equity call struck in domestic currency, where the foreign equity in domestic currency is defined as $S=S^fX^\phi$ with $0<\phi<1$, instead of the normal $S=S^fX$ (See Bjork 2020 for the standard setting). Here it would be incorrect to assume that $S$ has a drift of $r_d$ (d...
Roll's critique (Roll, 1977) can be summarized as follows (quoting Wikipedia): Mean-variance tautology: Any mean-variance efficient portfolio $R_{p}$ satisfies the CAPM equation exactly: $$ E(R_{i})-R_{f}=\beta_{{ip}}[E(R_{p})-R_{f}]. $$ Mean-variance efficiency of the market portfolio is equivalent to the CAPM equati...
I have the impression that asset pricing models such as the CAPM or Fama & French 3 factor model typically concern nominal rather than real (inflation-adjusted) prices/returns. If this is indeed so, why is that? Here is my guess. In cross-sectional asset pricing, there is no inherent time dimension (that is why it is c...
I'm learning QuantLib-Python and trying to replicate an Interest Rate Swap valuation on a custom curve constructed by passing lists of dates and discounting factors. Please see my code below import QuantLib as ql today = ql.Date(31, ql.May, 2023) ql.Settings.instance().setEvaluationDate(today) dates = [ql.Date(31, ql...
I'm using this formula to price sovereign CDSs according to CDS Returns, Augustin, Saleh and Xu (2020), Journal of Economic Dynamics and Control. As you can see, the highlighted part will become negative in the case the spread is lower than the coupon. I'm looking at 25bp coupon contracts, therefore prices often go ne...
I have a conceptual question regarding zero-coupon bonds. Say a bond issuer has issued a bond for funding itself, this bond has been split by the issuer (for simplicity assuming issuer is the same as market maker). The issuer sells the bond at a deep discount to the face value. This discount becomes the capital gains (...
I was reading Smile Dynamics II by Lorenzo Bergomi. It is clear to me that on page 2 $$ V_t^{T_1,T_2}=\frac{(T_2-t)V^{T_2}_{t}-(T_1-t)V^{T_1}_{t}}{T_2-T_1} $$ is the fair strike of a forward-starting variance swap that starts accumulating variance at $T_1>t$ and matures at $T_2>T_1$. However, I find it difficult to con...
In this question, I asked whether it is better to use clustered or GMM-based standard errors for estimating and testing asset pricing models such as the CAPM. However, I then realized that I am not sure how to set up the panel data model needed for obtaining the clustered standard errors, because the $\beta$s are unobs...
With time-constant expected value of market's excess return, we can estimate the CAPM using GMM as follows. Equation $(12.23)$ in Cochrane "Asset Pricing" (2005) section 12.2 (p. 241) says the moments are $$ g_T(b) = \begin{bmatrix} E(R^e_t-a-\beta f_t) \\ E[(R^e_t-a-\beta f_t)f_t] \\ E(R^e-\beta \lambda) \end{bmatrix}...
I am not able to make quantlib match bloomber price, maybe I don't use the right parameters into ql.Schedule or ql.FixedRateBond I have a price of : 90.012 instead of 93.508 [Huge spread between my result and bloomberg] Below is the reproducible example : import QuantLib as ql todaysDate= ql.Date(2,6,2023) ql.Setting...
I need a fast package for backtesting in R. I'm going to optimize a lot so I'll be running my strategies many millions of times. I know about packages like quantstrat or SIT but they are terribly slow for my purposes, I have one strategy, I'm not going to model 20 portfolios at the same time and such. Which package can...
I'm trying to calculate the total return (in %) on a 9% coupon 20-year bond with the following assumptions: reinvestment rate of 6% annually (3% every six months) terminal yield of 12% (semiannual rate of 6%) face value of the bond is 1000 Assume I buy the bond at par and hold it for 10 years. I keep getting 7.37% bu...
Is there a way to widen the 95% VaR by changing the distribution of a portfolio of stocks? When calculating 95% VaR of my portfolio using the holdings based approach (which requires the covariance matrix), more than 5% of the time it exceeds the upper/lower bounds. This is expected since in general the market has fatt...
Why the higher the fixed rate of a swap is, the higher the DV01 will be?
I am creating a RAROC/FTP model for different loan types on a credit union balance sheet. I am stuck on how to calculate the funding benefit of equity that would be netted out of my cost of funds benchmark. An example below shows the funding benefit @ 0.17%. Does anyone know where that may be sourced from or what calc...
Given the following SDE: $$ d\psi_t = \rho dt + \mu \psi_t dX_t$$, where $G(t) = \rho t$, $\rho = \frac{1}{T}$ $\psi_0 =0$, $T=1$, $\mu > 0$ and $X_t$ is a standard Brownian Motion (assume we know one specific path of $\psi_t$). Further, $E$ denote the mathematical expectation and $1$ the indicator function. The goal i...
I am looking to do some basic portfolio constructions as an experiment to learn more about it. I have been researching a bit and what I have found is that one of the purposes of factors models (Fama-French e.g.) is that it would allow us to model the variance/covariance of the factor portfolios themselves rather than t...
I have return data on several stocks that is regressed on two models. If I now want to compare if the estimated alpha differences between the two models are different from 0, do I use a unpaired t-test or a paired t-test?
I have been reading AFML ( Marcos López de Prado ) and I am having trouble understanding snippet 3.1 which provides the following code: def getDailyVol(close,span0=100): # daily vol, reindexed to close df0=close.index.searchsorted(close.index-pd.Timedelta(days=1)) df0=df0[df0>0] df0=pd.Series(close.inde...
At its most basic the volatility of an instrument is the standard deviation of its return series over time calculated as percentage change of the price series. How would this work for interest rate swaps where the "price" is a rate and is expressed as a percentage? I would be inclined to proceed using the percentage ch...
My question is about chapter 3 in the ninth edition of "Options, futures and other derivatives" by John C. Hull, subchapter 5 under the heading "Changing the Beta of a Portfolio". In the final paragraph, they explain how one can reduce the Beta of a portfolio by reducing the number of short contracts proportional to th...
If I run the below CDS pricing example (from https://github.com/lballabio/QuantLib-SWIG/blob/master/Python/examples/cds.py) using the UpfrontCdsHelper instead of the SpreadCdsHelper, I get the following error if I try to rerun for an earlier date relative to the initial date I used (e.g. rerun for May 15, 2006 after ru...
In the context of interest rate derivatives, we often speak of the spot date. But of course, there is not a "the" spot date, because there are multiple spot dates, for example for different currencies. There isn't necessarily even a single spot date for a currency. For example, SOFR and USD LIBOR swaps both have a two-...
I came across this passage in a book about PCA and denoising of Markowitz: But eigenvalues that are important from risk perspective are least important ones from portfolio optimization perspective. Information matrix mixes the returns and has Reciprocal values 1/λ k of the eigenvalues of the covariance matrix λ . This...
I know there is a large controversy about whether or not technical trading rules are profitable and research results depend on asset classes, time frames, trading costs, risk-adjusted return calculation, etc. Compared to this complexity it seems rather simple to statistically test, if resistance levels exist. One would...
Has anyone seen R script for GMM estimation and testing of asset pricing models such as Fama-French 3-factor or similar? Ideally, I would like to have R scripts corresponding to Cochrane "Asset Pricing" (2005) chapter 12 and related chapters. Now, I have looked around and found some bits for the CAPM (including in the ...
I am trying to figure out whether an options structure is short or long skew without just having someone tell me the answer. I'd like to calculate the number myself. Assuming I am creating a risk reversal at strike 90, 110: for strike 110: skew = IV of call @ strike 110 - IV of call @ strike 111 for strike 90: skew = ...
Can anyone help me with the stochvol package in R? I estimated the volatilities using this package but I am not being able to understand how to download the estimated volatilities. I used volplot function to plot the volatilities but not understanding how to download that output. I have used the following code. When I ...
Is there a practical way to calculate a delta threshold for rebalancing when gamma scalping? I know it does not effect expected P&L, but what about optimizing for P&L sharpe ratio after transaction costs?
I am currently working on pricing bonds and intend to utilize the S490 curve sourced from Bloomberg. This curve is constructed exclusively using swap rates. However, I have encountered challenges when incorporating the I-Spread and performing bond pricing calculations using this curve. As a result, I would like to asce...
I'm using QuantLib in Python to calculate the z-spread of a bond. I have a RelinkableYieldTermStructureHandle for the yield curve, but I'm getting a TypeError when I try to pass this handle to the ql.BondFunctions.zSpread() function. Wrong number or type of arguments for overloaded function 'BondFunctions_zSpread'. P...
I am trying to run a delta-hedge experiment for an American Put option but there's a (systematic) hedge error which I cannot seem to understand or fix. My implementation is found in the bottom of this post. My question: What is causing the hedge error observed in the bottom plot? I have noticed that the error is larger...
I have a stochastic volatility model of a commodity price as follows: ln(pt ) − m = ρ (ln(pt−1) − m) + exp(σt)ut ut ∼ IID(0, 1) σt − μ = ρσ(σt−1 − μ) + ηεt εt ∼ IID(0, 1) Can anyone help me estimate the expectation of the price which follows a Markov chain process? I have estimated the parameters and also hav...
I know that the need for a portfolio/strategy to be self-financing (the purchase of a new asset needs to be funded by selling of an older one/ones) is very helpful when attempting to price derivatives due being able to create replications of the derivative's payoffs, etc. However, do we gain anything (such as a "wrong"...
I tried a lot of different things to check for arbitrage on the following calls but didn't succeed. Let's suppose we have a stock that is currently valued at 40. The interest rate is 0.05 and the strike price of the european calls is 35. Call 1: price 6.75, run time 6 months Call 2: price 7.93, run time 9 months Call...
As I was working on this paper https://hal.science/hal-00319947/document by Emmanuel Gobet, I came across this paragraph that says to price a barrier option on (for example) two correlated assets, you can derive two biased estimators that acts like bounds and average them to estimate the price of the option. This looks...
I read everywhere that you create delta neutral positions to prevent being affected by directional change, and while I certainly agree for basic delta neutral options (a hedged vanilla for example), can't we find options that are delta neutral but not symmetrical in changes to the underlying? Imagine your payoff is a t...
I have recently been researching European options versus American options implied information. For European options, an overview article is Christoffersen(2012). But for American options, I only found some articles on extracting implied volatility. Christoffersen(2012) said, "The early exercise premium must be estimate...
I am trying to wrap my head around the statement that time series regression should not be used for testing a factor model when the factor is not a return. This has been mentioned in multiple posts, and there are specific posts about that, too, e.g. this and this. Cochrane explains this at the end of section 12.2 of "A...
I have a stochastic volatility model for commodity price which follows an AR(1) process: ln(pt ) − m = ρ (ln(pt−1) − m) + exp(σt)ut ut ∼ IID(0, 1) σt − μ = ρσ(σt−1 − μ) + ηεt εt ∼ IID(0, 1) After estimating the above process, I use the estimated parameters to solve a small open economy model where the price o...
I am trying to derive the credit spread using an hypothetical portfolio of a long corporate bond plus a short treasury bond, which have the exact cashflows. I should be able to get the credit spread in theory but they don't seem to match. Here are the assumptions. maturity 2 yr annualised coupon ( for both ...
Say I build a US treasury curve or swap by bootstrapping 2/3/5/7/10/20/30y on the run bonds. Say I have a prepayment model and an OAS model and I can generate key rate dv01s for the book as dBookNPV / dYield(i) where i is in [2, … , 30]. I can then dynamically hedge by shorting the right amount of all the on the runs t...
I am preparing for the Flow Traders test. What are the beste sources for this? I've used Zetamac's Arithmetic Game before, but I am curious if there is anything better available as well.
For example, in this post, it is asked where one can practice for trader's mental math tests. I can understand why as a trader you'd practice mental health test, but, in this day and age, can someone please explain to me what the use is of being able to calculate, e.g., -$\frac{8}{2.3}$ without a calculator? Is it to t...
One of the points of Roll's critique (Roll, 1977) can be summarized as follows (quoting Wikipedia): Mean-variance tautology: Any mean-variance efficient portfolio $R_{p}$ satisfies the CAPM equation exactly: $$ E(R_{i})-R_{f}=\beta_{{ip}}[E(R_{p})-R_{f}]. $$ Mean-variance efficiency of the market portfolio is equivale...
I believe that having a negative forward variance on a ATMF implied volatility curve of a volatility surface could imply the existence of a static arbitrage (for example, a calendar arbitrage). Although I tried to look at this from multiple perspectives, I could not come up with an answer. Therefore, I thought it might...
Bacon in Practical Portfolio Performance Measurement and Attribution distinguishes between the two, specifying that "Maximum drawdown represents the maximum loss an investor can suffer in the fund buying at the highest point and selling at the lowest" and Largest Individual Drawdown to be "the largest individual uninte...
Suppose $Y$ is an American Contingent Claim (ACC) defined as $Y = \{Y_t, t \in 0,1,...,T\}$ and asssume $U_t$ is its fair price. Also suppose $C_t$ is the arbitrage-free price at time $t$ of a European option with maturity $T$ and payoff $Y_T$. i) Write the Doob decomposition of the discounted fair price $U_t := U_t(1 ...
I have converted pine script (UT-Bot by Yo_adriiiiaan) strategy to python but facing some errors. It requires TRA calculation and trailing stop calculation. Problem is that talib.ATR() function returns array with some values and also NaNs, the variable nLoss dependent on ATR() return value also has some real values and...
In this article by Lopez de Prado et al., an algorithm was proposed for assessing the overfit of a trading strategy: The Probability of Backtest Overfitting There is also a package for R: pbo: Probability of Backtest Overfitting The following is the result of applying the function to an example: ## p_bo slop...
I was re-reading Chapter 6 of Stochastic Volatility Modeling by Lorenzo Bergomi. On page 203, he considers a forward variance of the following form: $$ d\xi_t^T=\lambda_t^T dZ_t^T, $$ where $Z_t^T$ is a standard Brownian motion for each $T>t$. Now he wants to prove on page 204 that: $$ dV_t=\frac{d \xi_t^T}{dT}\Biggr\...
I was looking at an example from my lecture notes regarding a reverse floater. We have the following data (We use the Act/365 convention): Nominal value: 1000 EUR Maturity: 14.04.2026 Coupon: 4,5% less a 6-month-reference interest rate, but at least 0% Clean price (02.03.2023): 97,25 For the reference interest rate we...
I'm reading Ernest Chan's book “Quantitative Trading: How to Build Your Own Algorithmic Trading Business 2E”. In example 3.4 of chapter 3, he defines: The daily return of a stock on day $d$ as $DailyRet(d)=\frac{Close(d)-Close(d-1)}{Close(d-1)}$, for example if stock L had close of 100 on day 0 and 110 on day 1, then ...
Optimizing a position typically requires two things: An assumption about how prices will behave in the future An objective function to maximize/minimize For certain cases in finance, we have closed-form solutions for optimal positions. For instance: Markowitz portfolio optimization states that if prices follow a mul...
As the title suggests. I want to understand why delta hedging is done. I'd like to illustrate with an example: Say you have 7 dte option chain with 15.8% IV ATM straddle on an underlying of spot 100. Price of straddle 0.8 x 100 x 0.158 x sqrt(7/250) = 2.1151 Now your 7 days volatility forecast says 12% and so you short...
Black and Scholes (1973) argue that their option pricing formula can directly be derived from the CAPM. Apparently, this was the original approach through which Fischer Black derived the PDE, although Black and Scholes present this approach as an "alternative derivation" in their paper. To date, the CAPM derivation is ...
The St Louis Fed publish data like this, https://fred.stlouisfed.org/series/T10YIE where the break even inflation rate is derived from treasuries and TIPS. Is there equivalent data derived from UK Gilts and inflation-linked gilts?
just wondering if there is a similar function that I can use to get the last traded price of a stock? Cuz the getQuote function from quantmod package does not seem to be working no more. It would show a message "Error in open.connection(con,"rb"): HTTP error 401." All suggestions are much appreciated. Thanks.
I have intraday (30 min) data for a number of stocks, and I would like to calculate the covariance matrix of returns. For the purpose of calculating the covariance matrix, is it better/more correct to calculate "one step" returns, i.e. 30 min returns intraday, with a single overnight return on each day, or to calculate...
I am trying to fit a time dependent Heston model using Quantlib Python. I'm getting the following runtime error: Boost assertion failed : px !=0. Can somebody help in this or is there an example of time dependent heston ? import numpy as np #% matplotlib inline from mpl_toolkits.mplot3d import Axes3D import matplotl...
I am trying to recalculate the prices of inflation cap in order to calibrate a SABR model. I have this table which gives me the normal volatilities values in % for the different strikes and different maturities. I have this curve of forward rate : And finally I have this table which gives me the cap prices in bp : I...
I have seen a lot of literature regarding the valuation of physical Bermudan Swaptions. However, I could not find any answer to the following question: if you're a trader and an expiry date is approaching, how do you know if you exercise now or not? I don't think that it is just by checking if the underlying swap value...
I've traded the "US 2YR NOTE (CBT) Jun23"- Future TUM3: On 15-03-2023 I bought 70 contracts at 103,67829. On 30-05-2023 I closed the position at 101,97266. The CTD was back then: T 0 ¼ 06/30/25. When I check the EOD yields for the treasury note I see: On 15-03-2023 a yield of: 3,93 % On 30-05-2023 a yield of: 4,62 %...