instruction
stringlengths
35
27.7k
I've been reading through the Queue Reactive Model paper, and wanted to implement it in Python. I have clean L2 data in the form below (over 450k events for one stock one day), with a timestamp, the nature of the event that triggered an orderbook change, either an Insert or a Remove (could be a market/marketable limit ...
I was reading about selling calls, where there is a distinction between selling a naked call versus a covered call. I fail to understand why owning the underlying matters in the case the call's buyer exercises the option. For example, if the call option is on stock XYZ with a strike price of \$100, and at expiry the ma...
I am trying to understand how the entry price is computed. I though it was just a weighted average (that is, SUM(amount * price) / SUM(amount)) and this does match the example at their documentation: https://bitmex.freshdesk.com/en/support/solutions/articles/13000081236-how-to-calculate-entry-price However, I am testin...
Dear Quantitative Finance Stack Community, Since many Quantitative propietary trading firms seem to be using Python over alternatives such as STATA. I have now decided to get myself familiar with Python as well. Since I want to be able to write and edit scripts in an efficient and reliable way in Python, I was wonderin...
I have read that for standard copula modeling, you can get empirical cdf of data and use it for copulas. But for time series data, we must first fit ARIMA/GARCH, get standardized residuals, and only then start copula modeling. What is the reason for this using standardized residuals and not directly the time series dat...
Question 1: In Modern Portfolio Theory, the case where we minimize variance given a set return and that the weights sum to 1, why is the return set as an equality constraint, not an inequality? Question 2: If we were to add an constraint, let us say an ESG constraint (we assign each asset an ESG score and force the wei...
The cointegration test between two time series variable is generally relevant from my understanding when you are performing a regression model. In terms of ARIMA model the approach is straightforward to use the Box-Jenkins methodology to build the ARIMA model. https://davegiles.blogspot.com/2016/07/the-forecasting-per...
in the picture below we have in the first coloumn the day of the month, in the second coloumn the time in millisecond in epoch time(elapsed from 1 january 1970), third coloumn the stock price and in the last coloumn the volume traded. I want to make this dataset equally spaced with a frequency of 5 minutes using previo...
I am reading paper "How to Combine a Billion Alphas" by Zura Kakushadze. In the paper, it has Ei which are the expected returns for alphas. It also has Ri hat as follows. I wonder what the difference is between Ei and Ri hat?
I want to improve the stability of my SDE sample (statistical properties do not change much when using a different seed). I am using a sobol brownian bridge to generate the brownian path increments dw. I have seen a noticeable improvement when I use qr/gram-schmidt orthogonalization of my dw samples as it makes the sam...
Let's say I have a yield curve, i.e. a series of times $t_1, ..., t_n$ and associated rates $r_{t_1}, ..., r_{t_n}$, such that my discount factors are $DF_{t_i} = (1+r_{t_i})^{(-t_i)}$. The curve has been computed using an implicit ACT/365 daycount convention. I have a payment occuring exactly 365 days from now, from a...
Been reading on option implied distributions and understand that this can be transformed into a confidence interval/fan chart showing the implied future price. Was wondering how I could go about doing so from the PDF which i have calculated as below from the second differentials of the underlying's Call Price after int...
I have daily close prices of two stocks, A and B. Suppose that we long stock A and short stock B. Assume that we do the long-short every day and hold that portfolio for some days. How to calculate each day's holding period return of this long-short strategy? My idea is that we first calculate the holding period return ...
Deal details issue_date = ql.Date(31, 1, 2011) maturity_date = ql.Date(31, 1, 2016) coupon_rate = 6.23/100 face_value = 250000 calendar = ql.NullCalendar() calendar.addHoliday(ql.Date(31,7,2011)) calendar.addHoliday(ql.Date(30,7,2011)) day_count = ql.Actual365Fixed() payment_frequency = ql.Semiannual schedule = ql.Sc...
I have implemented the Longstaff & Schwartz algorithm for pricing American Option in Python, but I ran into an issue while doing some experiments: sometimes, for the same option, I get a higher price for the European option (compared to the American one), which make me think that I made a mistake, but I do not know whe...
For the fixed leg, the daycount is needed since the PV is $\sum_t N\delta_{t}r DF_t$ where $\delta_t$ is the daycount accrual factor at time $t$. However for the floating leg it looks like $\sum_t N \delta_t F_t DF_t$ where $F_t = (P(t-1)/P(t) - 1)/\delta_t$. Here the daycounts cancel out, so when is the daycount accru...
My question is closely related to the answer of @LocalVolatility and his blogpost. I am trying to reproduce his first figure and I am struggling with the implied volatility. With the help of $$ f(S) = \sum^n_{i=1}p_i\frac{1}{\sqrt{2\pi}\sigma_i}exp\{-\frac{(S-\mu_i)^2}{2\sigma_i^2}\} $$ I know the probability density f...
Essentially the title to the above. I am using SABR to price caps and floors (as well as options on SOFR futures). I currently have two calibration techniques, the first calibrates based on rho and nu (using these to calculate alpha), and the second calibrates all 3 at the same time. I also use a fixed beta. As I under...
Below there is a trader’s portfolio. What is PnL explain for eod 04-July-2022? If you think that some information is missed feel free to add any data you need for calculations. Description strike trade-date Amount (EUR) Value-date discount-factor FxForward EURUSD 1.0573 23-May-2022 10,000 04-Jul-2022...
Has anyone read the paper 'JDOI variance reduction method and the pricing of American-style options' by Johan. I want to implement the simulation. But For Monte carlo I got different results. andI don't know how to do JDOI in python. https://doi.org/10.1080/14697688.2021.1962959 here is my code `# define standard mont...
I've implemented a L2 order book handler based on the classic blog post I'm sure everyone has come across when researching this topic! I've used the message files from LOBSTER sample data as input and formatted my output to match the LOBSTER order book files in order to check my work. After a few hundred lines of the m...
So Robert Shiller used to update his CAPE index file monthly. It seems that he stopped doing so in September 2023. Here's the link: http://www.econ.yale.edu/~shiller/data.htm To compute this index he needs 4 time-series of data: S&P 500 level S&P 500 earnings CPI data Long interest rate (GS10) Now number (3) and numb...
I am pricing a non-callable, fixed-rate, Canadian corporate bond with the following parameters: Name Value CUSIP 12657ZAT0 Evaluation Date 2/14/2024 Settlement Date 2/16/2024 Bond Issue Date 3/6/2009 Maturity Date 3/6/2024 Coupon Rate 6.215% Coupon Frequency 2 Day Count ACT/ACT Face Value 1000 ...
From the paper, High-frequency trading in a limit order book, (Avellaneda, 2006), from equations (16) and (17), the reservation price is given by $$ \begin{aligned} \theta_t + \dfrac{1}{2} \sigma^2 \theta_{s s} - \dfrac{1}{2} \sigma^2 \gamma \theta_s^2 & + \max_{\delta^b}\left[\frac{\lambda^b\left(\delta^b\right)}{\ga...
I’m currently working on a xgboost model to predict the price change above or below a given percentage between a candle’s open price and the next candle’s close price. I use a wide range of features, including market sentiment, unemployment rate, inflation, s&p ohlc data, as well as calculated technical indicators for ...
Say I had a pool of companies (specifically the Latin American Countries). The task was to work out the 'Correlation coefficient between the returns of any 2 companies selected from "different countries and different sectors" in the Latin American region. Instead of just working out that coefficient, there are 4 variat...
I have started to work with given two period binomial model S(0)=100 u=1.25 d=0.8 r=0.05 and the market probability of stock going up each period is p=0.55. I am trying to calculate two probabilities; P(S(2)>S(0)) -> For this one I thought only Suu (156.25)>100 so I assumed probability being 0.55x0.55. P(S(2) < S(1),...
Say that we want to find the efficient mean-variance portfolio (i.e. minimize variance given that weights sum to 1 and given a set target return) and impose a short sale constraint such that $w_i \geq 0$ for each $i$. My textbook states that Lagrange multipliers cannot be used to analytically solve this problem (which ...
I am reading about HAR models for realised variance and they all seem to use WLS or OLS to calculate the parameters. Now I understand how that works if you just use say the 10 years of AAPL intraday history. However, if you're doing this for a univariate model on many stocks (like it seems the authors do to create stab...
I'm reading the paper by J.Gatheral and A.Schied (2012) - "Optimal Trade Execution under Geometric Brownian Motion in the Almgren and Chriss Framework". On page 6, the authors provide a value function, which maps initial conditions with minimal cost value ($T$ - Time remaining to expire position, $X$ - value of positio...
I'm reading Natenburg's Options book, and I'm not understanding why "Buying a traditional butterfly is equivalent to selling an iron butterfly," because later in the text Natenburg says that "If we sell the June 95 / 100 / 105 iron butterfly we will take in some amount between zero and 5.00. We also hope that the under...
I am computing European Option Sensitivity as: Delta, Vega and Gamma. I am using Heston Model to simulation spot and the variance. While computing Delta and Gamma, I understand, we need to bump spot by 1 unit and re-compute option price(for delta) and delta(for gamma) respectively. My results matched with the Bloomber...
The CAPM is a single-period model that says $$ \mathbb{E}(R^*_i)=\beta\mathbb{E}(R^*_m) $$ where $R^*_i:=R_i-r_f$ is an asset's excess return, $R^*_i:=R_m-r_f$ is the market's excess return and $\beta:=\frac{\text{Cov}(R^*_i,R^*_m)}{\text{Var}(R^*_m)}=\frac{\text{Cov}(R_i,R_m)}{\text{Var}(R_m)}$. The latter equality ho...
Fabozzi, Ma and Oliphant (2008) have this very nice comparison between the return on the overall stock market and the return on sin stocks across multiple countries. They have done this for the period 1970-2007. Does anyone know where to find an updated estimate of this graph?
The realized variance under classical Black Scholes where the stock price process follows a GBM is given as $$V_T = \frac1T\int_0^T\sigma_s^2ds\qquad (1)$$ however, the texts I have been reading do not give a derivation of this fact. Further, it is stated, that in the case of the merton jump diffusion model, term $(1)$...
I'm trying to calibrate Hull White model in VietNam market to value IRS, CSS products which are not publicly traded. dr(t)=(θ(t)−αr(t))dt+σ(t)dW(t) I only have historical VNIBOR curves data, we do not have trading interest derivatives yet.So basically we have R_i(0,1/250), R_i(0,1/4), R_i(0,1/2), ... for obse...
I have a confusion about how to calculate RWA for a exposure with many types of CRM (says, collaterals and guarantee) in IRB approach. In BCBS128, point 206, "In the case where a bank has multiple CRM techniques covering a single exposure (e.g. a bank has both collateral and guarantee partially covering an exposure), ...
I am pricing CDS calibrating the default probabilities intensities using CDS spreads from Markit. Those spreads are given with a recovery. I have two questions regarding the recovery: In Option, Futures and Other Derivatives, Hull wrote that, provided we use the same recovery for calibrating default probabilities and ...
Let's say I want to run a series of regressions for zero-cost portfolio Y that goes long on stocks based on high variable x and short stocks with a low variable of x. How do I run the regression, for example, for CAPM? Is it: $$Y - r_f = a + b(market-r_f) + e$$ or $$Y = a + b(market-r_f) + e$$ Is it the first one only ...
I am using historical 30yr US treasury rates for a project. When I downloaded the rates from Bloomberg by queuing the history of the USGG30YR index, I found the numbers different from what US Department of Treasury has. A few examples: https://home.treasury.gov/resource-center/data-chart-center/interest-rates/TextView...
I have a number of different annualized realized volatility estimates (for the same point in time) that I'd like to combine. Is a simple average over these appropriate? Or should I do this in the variance space? $\sqrt{(\sum_{i} \sigma_i^2)/ n}$ Or would a geometric mean be more appropriate? These volatility estimates ...
I'm familiar with the volatility surface for equity options with the smile/skew dynamic and flattening with increased maturity, and the explanation/intuition behind its shape. However, today I came across the volatility surface for FX options, and I noticed that, unlike equity options, volatility is increasing with mat...
Suppose we are given a dataset with $T$ time periods and $N$ assets or portfolios. We are interested in estimating and testing an augmented CAPM or a multifactor model with an additional factor: the asset's idiosyncratic volatility. In the case of the augmented CAPM, the model is $$ \mu^*_{i}=\beta_i \mu^*_{m}+\gamma\s...
I've seen the formulae for Call valuation with the Heston model for non-dividend paying Stocks. How should I modify it to use it in an FX pair (which has two risk free rates: local currancy rate $r$ and foreign currency rate $q$)? Formulas for Stock (only $r$) i'd like with foreign currency rate $q$: $$ C(\theta;K,T)=\...
I am looking for an API to download the list of securities that will need to be in the 13F filings from asset managers. Does the SEC have such an API or a non-PDF file that can help with getting the data electronically? Thanks!
I'd like to do a montecarlo simulation of a $\Delta$ hedged strategy (long OTM call) to see how the PnL distributes on cases like: $\sigma_{bought} < \sigma_{realized}$ $\sigma_{bought} > \sigma_{realized}$ $\sigma_{bought} = \sigma_{realized}$. For this, I calculate the purchased option price with $\sigma_{bought}$ ...
The information I have found about delta hedging frequency and (gamma) PnL on this site and numerous others all reiterate the same thing: that the frequency at which you delta-hedge only has an effect on the smoothness and variance of your PnL. Nivel Egres: From the perspective of gamma pnl, the only thing that matter...
I've read even in recent papers, and on page 21 of the book "The Volatility Surface" by Jim Gatheral (2006), all the debate over whether to reflect or truncate negative variances whilst simulating the Heston process and the subsequent ramifications of what doing that entails, etc. It seems the solution is so simple it...
$$ \newcommand{\cbkt}[1]{\left\{{#1}\right\}} \newcommand{\rbkt}[1]{\left({#1}\right)} \newcommand{\sqbkt}[1]{\left[{#1}\right]} $$ Shreve volume I, defines an American derivative security as follows: Definition. An American derivative security is any contract that can be exercised at times $0,1,\ldots,N$. Let the ran...
Has there been any historical evaluation of the quality of credit ratings provided by agencies such as Fitch, S&P, and Moody's? Are there any academic resources available on this topic? I have checked Google Scholar, but could not find much. I'm curious to learn more about this topic, including the methodologies that c...
Suppose that yesterday I shorted some call and put option contracts of an underlying and I had a neutral delta. This morning, I have a positive delta, and I want to keep my delta neutral. What do I need to do and why do I need to make this action? Should I buy or sell its underlying future contract? Below is what I hav...
What is the optimal input and target variables for forecasting with a deep neural network on daily stock/index data? More specifically I’m training a temporal convolutional network, but a more general answer is also appreciated. Are normalized closing prices, daily returns, or nominal daily changes better inputs? For t...
Suppose we have the following random variables, given a fixed $t$ we define the last zero before $t$ and the first zero after $t$: \begin{align*} \alpha_t &= \sup\left\{ s\leq t: B(s) = 0 \right\}\\ \beta_t &= \inf\left\{ s\geq t: B(s) = 0 \right\}\ \end{align*} Why $\beta_t$ is a stopping time but $\alpha_t$ is ...
I have created a piecewise linear zero curve using quantlib (c++). It's a NACA, modifiedFollowing swap curve. When I extract the zero rates on the pillar dates the rates line up with what is expected but when I call zero rates in between I get a slightly different linear interpolated rate to what I'm expecting. The dis...
I'm having a problem getting options data with IB's API. The data seems not to be correct. In my code I'm getting some 0DTE call options for the Mini SP500 March Futures contract and printing their bid, ask and delta. For this I'm using the ib_sync which simplifies development greatly. This is the code: from datetime i...
I have recently read in a paper that the 25 day SMA and 36 day EWMA are equivalent for comparison in tests due to their half lives. The half life of the 25 day SMA is obviously 12.5 days and I understand the basic form of the equation to calculate the EWMA. I have been struggling trying to back out the half life from t...
I'm new to Quantlib on Python and I'd like to use the overnight swap rate from Bloomberg to derive the swap curve discount factors. I don't know which yield term structure I should specify? I checked the QuantLib Python Cookbook and the QuantLib-Python Documentation https://quantlib-python-docs.readthedocs.io/en/latest...
For an option with price C, the ΔC, with respect to changes of the underlying asset price S and volatility σ (first-order approximation), is given by $\Delta C=\delta \Delta S+\nu\Delta\sigma$, where δ, and ν are respectively the delta, and vega greeks. Assuming the asset S and the volatility σ as normal and indipenden...
I understand the NAV to be the sum of all assets minus the liabilities divided by the total number of shares. Would the assets include the financial derivatives held by the ETF? And if so, how is this less than the fund's exposure?
Why is an Option ATM DNS (Delta Neutral Straddle) strike calculated using exponential value of (rate + 0.5 variance) * t. For ATMF (At the money forward), the rate time is used as the value in exponential growth.
This is a very basic question/comment regarding the way that the LOOP is stated in the book "Dan Stefanica - A Primer for the Mathematics of Financial Engineering". The proposition goes as follows: What confuses me is that there is no restriction on the number of dividends paid by these portfolios at any time $t < \ta...
As the title suggests, what is the difference between calibrating an option pricing model (say the Heston model) to market option prices instead of computing their implied volatilities using Black-Scholes and subsequently calibrating the Heston parameters to them? I assume since "implied volatilities behave 'better' th...
Say that I have a historical series of yields and no coupon data because these yields come from a generic government bond, hence an constant maturity interpolation. How would I go about computing the daily returns of the bond, without having information on the coupon?
I'm currently looking into affine jump-diffusions. I would like to get to know the literature better and I know the paper by Duffie, Pan, and Singleton (2000) is a very celebrated paper. Although I find it a bit abstract as I'm quite new to these types of models. In particular, I'm looking at stochastic volatility mode...
I am trying to understand what the "correct"/optimal way of betting is using the Kelly Criterion but for bets that don't immediately give an outcome. For example, I have 100 dollars. I get a buy signal, I run Kelly Criterion and it says optimal is 20% bet, so I put 20 dollars on that buy signal. Now, let's say in the n...
I was reading this article, when I came across this text: Without using a complex options pricing model, one can use intuition to translate option prices into implied probabilities. For instance, the value of the call and put butterfly can be thought of as being directly proportional to the likelihood of the stock fin...
I'm working with a multi-asset worst of model and the outputs are FV,d1,d2,g1,g2,v1,v2,cega, theta. Its easy to assign proper delta, gamma, vega to the respective asset1 & asset2, but how would fair value, cega, and theta be properly split? Is it best to weight these parameters based off the total delta? for example s...
I am trying to solve the problem: Given two assets X and Y that follow a log normal distribution with volatility $\sigma_1$ and $\sigma_2$ respectively and with correlation $\rho$, what is the volatility of X*Y ? I tried modelling X and Y as: $$dX_{t} = X_{t}(\mu dt + \sigma_{1}dW_{t}^{1})$$ $$dY_{t} = Y_{t}(\mu dt + \...
The exact problem I am trying to solve is as follows. I have a Probit specification: $$ P_t = \Phi(\beta^T x_t) $$ where $\Phi$ is a standard normal CDF and $x$ is a matrix of independent variables measured at time $t$. $P$ is the probability of success. I am trying to calculate the marginal effect of change in each $x...
I have collected data to analyse statistically certain patterns. One of them gives me quite a high certainty it will fade off all day. Visually, when I observe a graph, it's straightforward if a stock fades all day or not (even if there's some occasional gaps). A simple definition of a stock which fades all day might b...
From my understanding, I know that we can decompose a long callable bond into a long vanilla bond and short receiver swaption. However, I do not understand, how could I separate or calculate the swaption part? From what I have learnt, swaption is a option on a fixed-float swap. But a FRN is paying a index rate with a s...
Can someone provide me an intuitive explanation of how discount factors are bootstrapped for SOFR when Swaps are trading with payment delay/ lag (e.g. of 2 business days). I can intuitively derive the discount factors when the payment lag is zero e.g. Trade Date Value Date Tenor Maturity Swap Rate Pay Lag 1 Feb...
In the paper Buy Rough Sell Smooth by Glasserman and He (2018), on page 5 equation (8) they define an estimate of the volatility of volatility ν, by setting $\log(ν)= β_1/2$. I would like to understand why this should be considered volatility of volatility, as $β_1$ is simply one of the regression terms in the mo...
I've just started studying quantitative finance and have had questions closed on this forum for being too basic; if that's the case for this one please let me know a more suitable place to ask. Assume the lending and borrowing interest rates are both a fixed constant $r$; let $V_K(t,T)$ be the value at time $t$ of bein...
I’m trying to price a call option on EUR/GBP exchange rate and it expires in 1 year. Should I use GBP Libor as foreign risk free rate in order to apply BS formula? The pricing date is 02/21/2023 but in this date there is no 12m GBP Libor https://www.global-rates.com/it/tassi-di-interesse/libor/sterlina-inglese/sterli...
I am reading the article, where different approximations for the pricing of basket options are presented. I have tried to reproduce the result obtained by the Gentle's method in Python. We define the price of a basket of stocks as the weighted average of the prices of $n$ stocks at maturity $T$ $$ B(T) =\sum^n_{i=1} w_...
I am interested to know what the current market practice is around putting aside reserves around derivatives trades. If for example a trader sells a large derivative trade and the difference between the theoretical value and price sold is $1m, how much of this can be claimed as Day 1 PnL and how is the rest released to...
I'm starting to teach myself quantitative finance and I've got several questions (marked in bold) regarding the replicating portfolio of a security in the binomial model. I'm following, among others, the classical book "Stochastic Calculus for Finance I: The Binomial Asset Pricing Model". First, I'll start with some no...
Long time reader, first time asker! I am working on a portfolio optimizer where I have a universe which is much larger than potential portfolio and where I want to exclude small transaction, i.e. a thresh-hold where the absolute value needs to be larger than "theta". gamma = 1 # penalization of turnover eps = 1e-5 pro...
were wondering If anyone knows how to use rate bonds on Python Quantlib, that have an ex-coupon period. For example the link below shows the construction of such a bond in the c++ quantlib using FixedRateBond bond(settlementDays, 100.0, schedule, std::vector(1, coupon), dc, Unadjusted, 100.0, issueDate, calendar, exCou...
In JPM's note on variance swaps, on page 29, they say "... a long variance swap is also long volatility of volatility". In Bennett's book Trading Volatility, on page 115, he says "... a variance swap has no vol of vol risk". I thought Bennett is correct, that variance swaps do not have vol of vol risk, because variance...
I'm asking for the curve construction of the discount curve in the case where payment currency and collateral currency are different. If I refer to BBG, in the case of a USD swap collateralized in EUR, they use the curve N°400 (MBB EUR Coll For USD). How do they construct this curve ?
If both models fit their closed form formulas to market prices, why should I prefer a more complex model? ($\mathbb{Q}$ version has one extra parameter $\lambda$) Do valuation with dynamics work better under the $\mathbb{Q}$-measure version?
Say we have the active German government bond future, RXH3 and we wanted to calculate a series of returns for the active contract. Would we calculate returns on the daily price difference? And if so, what would happen on the roll day? Or would be calculate returns on the Cheapest to Deliver bond?
How are SOFR implied vols calculated? Are they normal or log normal? When we are pricing options with black-76 model, implied volatility must be log-normal as black model assumes log normal distribution of prices. right? Now that we have transitioned away from LIBOR, does SOFR calculates implied volatility which agrees...
Suppose I am a market maker making a market on an S&P ETF. Suppose that I have calculated a fair ETF price of $395. My market therefore is 394.90 (bid) and 395.1 (ask). After my bid is posted I got filled with 10 shares of the ETF. Now I want to hedge this exposure. Suppose that 1 outstanding ETF share consists of the ...
FIX has a few fields that do or could contain identifying information for equity option orders, the “Actionable Identifier” field in particular, although the OCC states here that “It will not be visible to the contra party to the trade or any other party.“ Is that true that this field is hidden except during the cleari...
I am preparing a financing model and in the template the EBT calculation is: EBT=EBIT - Interest Expense. However, I wonder if interest income (from keeping the money on the bank) should be added, i.e. EBT=EBIT + Interest Income - Interest Expense? Many thanks for your explanation!
I am trying to use the Vech-HAR (the mulitvariate HAR) model in order to forecast some covariances. I have been looking into the model proposed by Chiriac Modelling and forecasting multivariate realized volatility (2010) (link) that states the model as: Here $X_t = vech(P_t)$ where $P_t$ comes from the cholesky decomp...
I have two lists to describe the function y(x) that represents strikes and the relative value of the skew of a volatility surface: x_points = [22.56, 27.07, 31.58, 36.10, 40.61, 45.12, 49.63, 54.14, 58.66, 63.17, 67.68] %strikes value y_points = [97.44, 87.32, 79.73, 75.47, 73.58, 74.53, 78.61, 83.64, 88.03, 92.26, 96...
It is known that if the CAPM holds then the E(R) = CAPM predicted return and all securities lie on the SML. However, in each period, there is an error term that is non-zero in every single observation but that is 0 on average (as in any regression) In my view, if the CAPM perfectly holds and we run a regression between...
I would like to simulate a local volatility underlying $$ dS_t = S_t\sigma(t, S_t)dW_t $$ and have looked at QuantLib's LocalVolTermStructureHandle to do so. So far: today = ql.Date().todaysDate() calendar = ql.NullCalendar() dayCounter = ql.Actual365Fixed() spot = 100 rate = 0.0 initial_value = ql.QuoteHandle(ql.Simp...
How are asset prices set when investors face heterogeneous expectations? Does some form of "negotiation" take place so that the market price is set? Can investors face heterogeneous costs of capital (even under homogeneous expectations)? Would this be an explanation for differences across portfolios? For example, inv...
I'm currently using QuantLib to perform financial calculations in my application, but I'm having trouble finding a DayCount convention that supports the India financial year calendar (April 1 to March 31). I've tried using the Actual/365 (Fixed) convention, but this assumes a calendar year of January 1 to December 31. ...
Given a strategy with normal returns with mean 5% and standard deviation 10% what is the optimal leverage (up to a maximum of 2x) to maximize the expected wealth? With the same setting, if trading is discretized in 5 rounds, what is the optimal leverage? With a Monte Carlo approach, the optimal leverage seems to be the...
I'm trying to predict the one-day ahead movement of the S&P 500 with Temporal Convolutional Networks 1 to capture some "memory". I use daily close data with the loss function $\mathrm{MSE}(f(x_0, \ldots, x_T), y_T)$ where $f(x_0, \ldots, x_T) = \hat y_T := x_{T+1}$ is the output of the neural network. I've tried count...
Theta is the change of an options value with respect to time. But theta itself changes over time. Today's option theta is not the same as tomorrow's option theta. What is the greek name for this value? And where can I learn more about it? This would seem like a useful measurement in things like calendar spreads where t...
Consider an (inhomogeneous) Poisson process $N_t$ with intensity $\lambda_t$. Then I want to compute the following integral $\mathbb{E} \left(\int f(t,N_{t-}) d\tilde{N}_t\right)^2$ for some smooth enough function $f$ and $d\tilde{N}_t=dN-\lambda_t dt$ denotes the compensated process. Is it true that $$ \mathbb{E} \lef...
The following 5 year, zero coupon, structured note, issued at par (full terms of which are available at EDGAR) is linked to the S&P500, but seems to be at least as good as the underlying in all situations. I don't understand how the bank can afford to issue it. I know owners of the note forgo dividends and are exposed ...
Imagine that the underlying stock price is 110. The call option has a strike price of 100. The annualized volatility is 25% and the interest rate is 10%. Finally, the time to maturity is 0.5 years. We sell this call option and we want to hedge it. According to the Black-Scholes model, this option has a delta of 0.819, ...