instruction
stringlengths
15
26.1k
I am trying understand and replicate this [thesis](https://pure.manchester.ac.uk/ws/portalfiles/portal/208486475/FULL_TEXT.PDF), which is based on, *High-frequency trading in a limit order book* by [(Avellaneda and Stoikov, 2008)](https://math.nyu.edu/~avellane/HighFrequencyTrading.pdf) and *Optimal market making*, by ...
I am trying understand and replicate this [thesis](https://pure.manchester.ac.uk/ws/portalfiles/portal/208486475/FULL_TEXT.PDF), which is based on, *High-frequency trading in a limit order book* by [(Avellaneda and Stoikov, 2008)](https://math.nyu.edu/~avellane/HighFrequencyTrading.pdf) and *Optimal market making*, by ...
I am trying understand and replicate this [thesis](https://pure.manchester.ac.uk/ws/portalfiles/portal/208486475/FULL_TEXT.PDF), which is based on, *High-frequency trading in a limit order book* by [(Avellaneda and Stoikov, 2008)](https://math.nyu.edu/~avellane/HighFrequencyTrading.pdf) and *Optimal market making*, by ...
Is call/put wing smile calibration approach used in practice? To calibrate an index (SPY) using only OTM calls/puts, to kind of use an "if" condition on K to S0 to determine whether to use call or put formular? More details; literature I found on the internet usually calibrate vol smiles/skews to call options (Eur...
Is call/put wing volatility smile calibration approach used in practice? To calibrate an index (SPY) using only more liquid OTM calls/puts, to kind of use an "if" condition on K to S0 to determine whether to use call or put formular? More details; literature I found on the internet usually calibrate vol smiles/ske...
Is call/put wing volatility smile calibration approach used in practice? To calibrate an index (SPY) using only more liquid OTM calls/puts, to kind of use an "if" condition on K to S0 to determine whether to use call or put formular? More details; literature I found on the internet usually calibrate vol smiles/ske...
I am trying understand and replicate this [thesis](https://pure.manchester.ac.uk/ws/portalfiles/portal/208486475/FULL_TEXT.PDF), which is based on, *High-frequency trading in a limit order book* by [(Avellaneda and Stoikov, 2008)](https://math.nyu.edu/~avellane/HighFrequencyTrading.pdf) and *Optimal market making*, by ...
I am trying understand and replicate this [thesis](https://pure.manchester.ac.uk/ws/portalfiles/portal/208486475/FULL_TEXT.PDF), which is based on, *High-frequency trading in a limit order book* by [(Avellaneda and Stoikov, 2008)](https://math.nyu.edu/~avellane/HighFrequencyTrading.pdf) and *Optimal market making*, by ...
I want to know how to price an American call option for non-dividend stock? (with concrete and simple binomial pricing model, with risk neutral assumption) I understand that for an European call option, (in Binomial pricing model), the price is simply: $$V_n(\omega) = \frac{1}{1+r} (PV_{n+1}(\omega H) + QV_{n+1}(...
How to and What is the price of an American call option for non-dividend stock?
I want to know how to price an American call option for non-dividend stock? (with concrete and simple binomial pricing model, with risk neutral assumption) I understand that for an European call option, (in Binomial pricing model), the price is simply: $$V_n(\omega) = \frac{1}{1+r} (PV_{n+1}(\omega H) + QV_{n+1}(...
I want to know how to price an American call option for non-dividend stock? (with concrete and simple binomial pricing model, with risk neutral assumption) I understand that for an European call option, (in Binomial pricing model), the price is simply: $$V_n(\omega) = \frac{1}{1+r} (PV_{n+1}(\omega H) + QV_{n+1}(...
Your formulas seem correct, and what you have to do is to build the tree you have written in (2). Now regarding the american vs european question, let me state a question: For a dividend paying underlying, what is the the advantage of an american call w.r.t its european counterpart? ... and there you have the a...
I am currently working on calculating financial metrics, particularly Free Cash Flow to Equity (FCFE) etc., for investment analysis. In the context of financial analysis, I'm wondering which set of data is generally considered more preferable for my purpose: the restated financials reflecting the most recent adjust...
Accuracy/Quality of financial data: revised financials or historical financials?
I have two datasets of log returns, one is clearly normal while the other is t-distributed. I want to fit these with a mutlivariate GARCH model. A multivariate GARCH model is defined as $$\mathbf{r}_t=\mathbf{H}_t\boldsymbol{\epsilon}_t$$ Where $\mathbf{H}_t$ is the conditional covariance matrix and $\boldsymbol{\eps...
Can the white noise in multivariate GARCH have different distributions?
I have two datasets of log returns, one is clearly normal while the other is t-distributed. I want to fit these with a mutlivariate GARCH model. A multivariate GARCH model is defined as $$\mathbf{r}_t=\mathbf{H}_t\boldsymbol{\epsilon}_t$$ Where $\mathbf{H}_t$ is the conditional covariance matrix and $\boldsymbol{\eps...
If we have a 30y swap with 5y early termination breaks exercisable by either party, at each termination period, who would exercise the early termination/choose to break the swap? Is there an optimal exercise behaviour?
If we have a 30y swap with 5y early termination breaks exercisable by either party, at each termination period, who would exercise the early termination/choose to break the swap? Is there an optimal exercise behaviour? Also, what's the benefit of having such a break clause vs. just going back in 5y time and asking to u...
I want to know how to price an American call option for non-dividend stock (with concrete and simple binomial pricing model, with risk neutral assumption). I understand that for an European call option, (in Binomial pricing model), the price is simply: $$V_n(\omega) = \frac{1}{1+r} (PV_{n+1}(\omega H) + QV_{n+1}(...
Is the Multilevel Monte Carlo method implemented in QuantLib? would it make sense to implement it?
Multivel Monte Carlo in QuantLib?
According to [CME's definition of Open Interest][1], if Trader A is long 3 contracts, and decides to sell 1, then the open interest decreases by 1. What I don't understand: if Trader A sells their contract, there must be some Trader B buying it. Then open interest should remain the same. Unless Trader B had a short ...
Is there Multilevel Monte Carlo in QuantLib?
I am trying to understand how currency hedged ETF returns work with a simple example, namely, that where a Swiss investor can choose between buying a S\&P-500 index fund which either a) hedges the USD-exposure in CHF or b) doesn't hedge currency exposure. --- Consider a two-period market with the following proper...
How do currency hedged ETFs work?
Is the Multilevel Monte Carlo method implemented in QuantLib? If not, would it make sense to implement it? Is it doable taking into account the structure of the library?
**Short Version** - Market standard is to use Normal Vol (used in the Normal / Bachelier model) - Market data comes from contributors like Tullett, ICAP and the like and can be premium and vol quoted etc. - Usually, these quotes are filtered and combined into a generic quote (e.g. BVOL for Bloomberg Volatility) - ...
**Short Version** - Market standard (since the low interest rate environment after 2008) is to use Normal Vol (used in the Normal / Bachelier model) - Market data comes from contributors like Tullett, ICAP and the like and can be premium and vol quoted etc. - Usually, these quotes are filtered and combined into a g...
Intuition for why it's called "implied repo rate"?
I have the following general question regarding the use of ML in quantitative finance: Lets say I want to train a model (for simplicity lets consider a neural network), so that I feed some market data for a stock, and I want to compute something on it (the specific goal is not important here, imagine just a pricer)....
I have $n$ stock return time series $X_1, X_2, ... X_n$. I want to measure how much they have "dispersed" over time. i.e. are they moving "more together" in 2023, comparing to 2022. $n$ is about 50. Time series are measured in the same points in time (in fact, daily, so no more than 365 data points a year). If the...
Arguably there is not a single, objective measure that quantifies how much assets disperse over time. There are multiple that I've come across over time and they all require some form of creativity and subjectivity (e.g. rolling window or non-overlapping samples, high or low frequency, raw or preprocessed data). Here's...
Arguably there is not a single, objective measure that quantifies how much assets disperse over time. There are multiple that I've come and they all require some form of creativity and subjectivity (e.g. rolling window or non-overlapping samples, high or low frequency, raw or preprocessed data). Here's a selection of c...
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...
Why do one's current holdings matter when selling calls?
I have the following general question regarding the use of ML in quantitative finance: Lets say I want to train a model (for simplicity lets consider a neural network), so that I feed some market data for a stock, and I want to compute something on it (the specific goal is not important here, imagine just a pricer)....
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 ...
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 ...
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...
In copula modeling for time series data, why do we need to fit ARIMA/GARCH and then work on standardized residulas.?
If the univariate time series follow ARMA+GARCH, why do we not model them as i.i.d.? After all, it would make our job easier. The answer is, inference based on an i.i.d. assumption will be wrong and forecasts suboptimal when the series follow ARMA+GARCH (or contain autocorrelations and autoregressive conditional hetero...
Here is how I remember it: In the famous paper by Carr and Madan *Towards a theory of volatility trading* the term $\frac{\Gamma S^2}{2}$ is referred to as "half the dollar gamma" so the dollar gamma is $\Gamma S^2$. Carr was the world's foremost expert on volatility trading (RIP) and the main result in that paper is w...
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 forc...
Why not inequality constraint in mean-variance portfolio optimization?
Does cointegration test of exogenous variable with Y variable make sense when doing ARIMAX/SARIMAX?
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 previ...
I am reading paper ["How to Combine a Billion Alphas"](https://arxiv.org/abs/1603.05937) 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? [![enter image description here][1]][1] [1]: ht...
What is Ei in paper "How to Combine a Billion Alphas" by Zura Kakushadze?
I'm exploring financial simulations where bootstrapped returns (TxNBoot) are used to derive compounded returns, crucial for longer time horizons (T > 180 months). This results in a vector of terminal wealth payoffs (NBootx1) at T, typically following a log-normal distribution with minimum values above 0 due to compou...
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, fro...
How to compute discount factor from yield curve when there are two daycounts in play?
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 ...
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 ret...
How to calculate holding period return of a long-short strategy?
How does the isInArrears affects the quantlib IborLeg?
I want to know how to price an American call option for non-dividend stock (with concrete and simple binomial pricing model, with risk neutral assumption). I understand that for an European call option, (in Binomial pricing model), the price is simply: $$V_n(\omega) = \frac{1}{1+r} (PV_{n+1}(\omega H) + QV_{n+1}(...
### Deal details ```python 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.Sem...
How does the isInArrears affect the quantlib IborLeg?
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 ac...
When are daycounts needed for the floating leg of a swap?
My question is closely related to the [answer][1] of @LocalVolatility and his [blogpost][2]. I am trying to reproduce his first figure and I am struggling with the implied volatility. With the help of $$ f_Y(x) = \sum^n_{i=1}p_i\frac{1}{\sqrt{2\pi}\sigma_i}exp\{-\frac{(x-\mu_i)^2}{2\sigma_i^2}\} $$ I know th...
My question is closely related to the [answer][1] of @LocalVolatility and his [blogpost][2]. I am trying to reproduce his first figure and I am struggling with the implied volatility. With the help of $$ f_Y(x) = \sum^n_{i=1}p_i\frac{1}{\sqrt{2\pi}\sigma_i}exp\{-\frac{(x-\mu_i)^2}{2\sigma_i^2}\} $$ I know th...
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 u...
Calibrating SABR -- Can I calibrate the forward like any other parameter?
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. strike trade date Amount (EUR) Value date discount factor FxForward EURUSD 1.0573 23-May-2022 10,000 04-Jul-2022 FxForward EURU...
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...
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 u...
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-J...
I've implemented a L2 order book handler based on the classic [blog post][1] 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 lin...
Are there initializing snapshots to include all order IDs in LOBSTER sample data?
Can't speak to the veracity of this data series but found these for (1) S&P 500 level and (2) S&P 500 earnings (1) https://finance.yahoo.com/quote/%5EGSPC/history https://www.multpl.com/s-p-500-historical-prices/table/by-month (2) https://www.multpl.com/s-p-500-earnings/table/by-month The fourth l...
I am pricing a non-callable, fixed-rate, Canadian corporate bond with the following parameters: | Name | Value | |----------------------|--------------| | CUSIP | 12657ZAT0 | | Settlement Date | 2/16/2024 | | Bond Issue Date | 3/6/2009 | | Maturity Date ...
I am pricing a non-callable, fixed-rate, Canadian corporate bond with the following parameters: | Name | Value | |----------------------|--------------| | CUSIP | 12657ZAT0 | | Settlement Date | 2/16/2024 | | Bond Issue Date | 3/6/2009 | | Maturity Date ...
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 Dat...
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 Dat...
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 Dat...
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 Dat...
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 Dat...
From the paper, [**High-frequency trading in a limit order book**, (Avellaneda, 2006)](https://math.nyu.edu/~avellane/HighFrequencyTrading.pdf), from equations (16) and (17), the reservation price is given by $$ \begin{aligned} & \theta_t+(1 / 2) \sigma^2 \theta_{s s}-(1 / 2) \sigma^2 \gamma \theta_s^2 \\ & +\ma...
From the paper, [**High-frequency trading in a limit order book**, (Avellaneda, 2006)](https://math.nyu.edu/~avellane/HighFrequencyTrading.pdf), from equations (16) and (17), the reservation price is given by $$ \begin{aligned} & \theta_t+(1 / 2) \sigma^2 \theta_{s s}-(1 / 2) \sigma^2 \gamma \theta_s^2 \\ & +\ma...
From the paper, [**High-frequency trading in a limit order book**, (Avellaneda, 2006)](https://math.nyu.edu/~avellane/HighFrequencyTrading.pdf), from equations (16) and (17), the reservation price is given by $$ \begin{aligned} & \theta_t+(1 / 2) \sigma^2 \theta_{s s}-(1 / 2) \sigma^2 \gamma \theta_s^2 \\ & +\ma...
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 ...
I've been reading through the [Queue Reactive Model][1] 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/marketab...
1. Say I had a pool of companies (specifically the Latin American Countries) 2. and 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., 3.but instead of just working out that coefficie...
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 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 Dat...
Answering both questions: 1. Your answer is correct. 2. Is the comma (in the probability function) an "And" or a "Or", what is the mathematical notation used? From what you answered, it seems like an "And", and in which case your answer seems correct as well.
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 (whi...
The generic way to compute such returns is to multiply the asset returns over a specific period with the weights at the start of that period. For a short position, the weight is negative. If you do not rebalance over the *k* days, you should simply multiply each asset's *k*-day return with the initial weight, and then ...
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 ret...
The generic way to compute such returns is to multiply the asset returns over a specific period with the weights at the start of that period. For a short position, the weight is negative. If you do not rebalance over the *k* days, you should simply multiply each asset's *k*-day return with the initial weight, and then ...
In QuantLib the following occurs for the floating coupon if isInArrears is true: ```c++ Date FloatingRateCoupon::fixingDate() const { // if isInArrears_ fix at the end of period Date refDate = isInArrears_ ? accrualEndDate_ : accrualStartDate_; return index_->fixingCalendar().advance(refDate, ...
Thank you for checking out this post. I already asked a question once on this forum, and you did a great job helping me out with that topic, as I couldn’t have come across a solution myself. This time, for a totally different topic, I once again need your precious help. The thing is rather simple and might be very...
In QuantLib the following occurs for the floating coupon if isInArrears is true: ```c++ Date FloatingRateCoupon::fixingDate() const { // if isInArrears_ fix at the end of period Date refDate = isInArrears_ ? accrualEndDate_ : accrualStartDate_; return index_->fixingCalendar().advance(refDate, ...
The generic way to compute such returns is to multiply the asset returns over a specific period with the weights at the start of that period. For a short position, the weight is negative. If you do not rebalance over the *k* days, you should simply multiply each asset's *k*-day return with the initial weight, and then ...
Can't speak to the veracity of this data series but found these for (1) S&P 500 level and (2) S&P 500 earnings (1) https://finance.yahoo.com/quote/%5EGSPC/history https://www.multpl.com/s-p-500-historical-prices/table/by-month (2) https://www.multpl.com/s-p-500-earnings/table/by-month The fourth l...
Can't speak to the veracity of this data series but found these for (1) S&P 500 level and (2) S&P 500 earnings (1) https://finance.yahoo.com/quote/%5EGSPC/history https://www.multpl.com/s-p-500-historical-prices/table/by-month (2) https://www.multpl.com/s-p-500-earnings/table/by-month The fourth l...