instruction
stringlengths
15
26.1k
Suppose that you want to calculate the [single period return][1]. Let <code>p0</code> be the initial price and <code>p1</code> be the final price over the period. The most common formula is (p1 - p0) / p0 But I also sometimes see people use (p1 / p0) - 1 Algebraically, both forms are equivalent....
I've written a paper for university on Random Matrices and during my research I've had an interesting idea, let me explain: Wigner's Semicircle Law has seen much advancement since its original proof in 1955, most recently I believe being Tao's proof of the Wigner-Gaudin-Mehta-Dyson conjecture showing universality. No...
My question ----------- I have a question on how to model the cashflows of fixed-rate loans or mortgages. Let's say the payments are monthly, and the rate remains constant throughout the life of the product; each month the borrower(s) will pay the same amount, easily calculated with the pmt() formula available i...
My question ----------- I have a question on how to model the cashflows of fixed-rate loans or mortgages. Let's say the payments are monthly, and the rate remains constant throughout the life of the product; each month the borrower(s) will pay the same amount, easily calculated with the pmt() formula available i...
[Axibase Time Series Database](https://axibase.com/docs/atsd/finance/) is a non-relational alternative with a built-in schema for tick, EOD, and reference data. Querying statistics in ATSD by common criteria such as symbol, date range, strike price etc. should be much faster than reading from the input files since the ...
Suppose that you want to calculate the [single period return][1]. Let <code>p0</code> be the initial price and <code>p1</code> be the final price over the period. The most common formula is (p1 - p0) / p0 But I also sometimes see people use (p1 / p0) - 1 Algebraically, both forms are equivalent....
## Question - Can I apply different hyper-parameters for different training sets? - I can see the point of using the shared parameters but I cannot see the point of using shared hyper-parameters. The advantage of using the shared parameters is introduced in the following question: [Recurrent NNs: what's the point of ...
Can I dynamically change hyper-parameters of a model?
I have the following code(is not mine) in an Expert Advisor: if((Handle(DXHandle, 0) - Simbolo.Ask()) >= (DXPontosDistancia * _Point)){...} Handle(DXHandle,0) is a function that returns the value of an moving average of seven candles of one minute. DXPontosDistancia is a value that they obtained from ...
Suppose that you want to calculate the [single period return][1]. Let <code>p0</code> be the initial price and <code>p1</code> be the final price over the period. The most common formula is (p1 - p0) / p0 But I also sometimes see people use (p1 / p0) - 1 Algebraically, both forms are equivalent....
Assuming I am bought gold at $100 from spot market, and I am shorting gold December-31 futures at $120 which is cash settle, and I earn $20 forward premium when settle; And when gold price drop, of course I can gain from Dec-31 futures contract as it also consider a hedge, what if the Gold price pumped to $200? At ...
Potential risk from profiting forward Futures contract?
[Axibase Time Series Database](https://axibase.com/docs/atsd/finance/) is a non-relational alternative with a built-in schema for tick, EOD, and reference data. Querying statistics in ATSD by common criteria such as symbol, date range, strike price etc. should be much faster than reading from the input files since the ...
[Axibase Time Series Database](https://axibase.com/docs/atsd/finance/) is a non-relational alternative with a built-in schema for tick, EOD, and reference data. Querying statistics in ATSD by common criteria such as symbol, date range, strike price etc. should be much faster than reading from the input files since the ...
Lets say I construct a parametrisation of the volatility surface that lets me infer dynamics i.e correlation between strike vol. Is computing the sample correlation (after controlling for spot-vol correlation) a reasonable way to test this model? Is there a better framework to answer this question?
What's a sensible way to measure correlation in the volatility surface?
How importers and exporters sell/buys products if their country currency is non convertible or when non residents want to invest in the country? For example in Brazil.
I learned Markowit'z mean-variance optimzation in school. Now I've been googling a bit, and to my surprise, Markowit'z is STILL being used by most people, AFAIK. Are there really not some state-of-the-art algorithms/models developed recently (say, between 2005-2020) that are well-proven and known to be better tha...
State-of-the-art MVO methods?
Assuming I am bought gold at \$100 from spot market, and I am shorting gold December-31 futures at \$120 which is cash settled, and I earn \$20 forward premium when settle; And when gold price drop, of course I can gain from Dec-31 futures contract as it also consider a hedge, what if the Gold price pumped to \$200? At...
1. gold futures (COMEX, anyway) are physically settled 2. unless your PB is offering you cross-margining between spot and futures, you have a lot of MTM / margin risk on the trade. This is not "risk free profit making". There is no such thing. If you think there is, you are overlooking something (latency, execu...
Is https://www.nytimes.com/2018/02/02/your-money/stock-market-after-hours-trading.html correct? I don't think so because it doesn't consider dark pools? Of note, each business day has only 6.5 trading hours. Adjusting for holidays, there are 253 trading days per year, so 1644 trading hours. There are 8760 total hou...
Is it more profitable to invest in the S&P 500 outside regular trading hours?
I must too confess ignorance about Wigner-Kermit-Ringo processes :-) But I do know about PCA, and iterative reductive market processes,,, I suspect (but cannot hope to prove) that you are posing a false opposition here? Yes, grains and metals are correlated. So associated stocks (eg Deere and Rio Tinto) will indeed ...
This "result" has been widely circulated. I have yet to see it well defined and properly tested and I'm not sure it makes sense to discuss it 'as is'. 1) What is the "S&P 500"? SPY? ES? Something else? 2) What are "regular trading hours"? Cash equity hours? Regular trading hours for ES are very different ([CME link...
* So a classic delta-hedged portfolio on a call option is: $$-C - \Phi(d) \cdot B + \frac{d}{dS}C \cdot S = 0$$ * How is risk of other Greeks hedged? Is it something like this? $$-C - \Phi(d') \cdot B + \text{max}\left(\frac{d}{dS}C, \frac{d^{2}}{dS^{2}}C, \frac{d}{d \sigma}C, \frac{d}{d r}C, \frac{d}{dt}C\right) \c...
How does a hedged portfolio account for other greeks?
Consider the multiperiod binomial/CRR model with one risky asset $S^{1}$ and a numeraire $S^{0}$. By seeing that the equivalent martingale measure is uniquely determined, we obtain that the market is complete. A question that I have asked myself is whether adding another risky asset $S^{2}$ to the market ruins compl...
Does CRR Model lose completeness if we add another instrument?
Consider the multiperiod binomial/CRR model with one risky asset $S^{1}$ and a numeraire $S^{0}$. By seeing that the equivalent martingale measure is uniquely determined, we obtain that the market is complete. A question that I have asked myself is whether adding another risky asset $S^{2}$ to the market ruins compl...
Would appreciate clarification on the below scenario. If a put option was sold at the start of the week, when the broker (Interactive Brokers) calculates the cost basis (the premium collected) are the option greeks fixed at that point of writing the option and used for this cost basis (along with commission)? I n...
I am going for an interview for a quant job in two weeks. The interview will focus on my mathamatic knowledge about stochastic process & stochastic calculus, and in the interview I will definately be asked to solve questions of stochastic process (ito/poission, etc..), stochastic calculus, and perhaps to price/model se...
How can I learn stochastic process & stochastic calculus in two weeks?
I have a question regarding the Pairs Trading strategy based on the Cointegration Approach. Most of the papers/literature I found on Pairs Trading using the Cointegration Approach are usually testing a given period for Cointegration (say 6 months) and then consider this pair for their trading strategy if the Cointegra...
I've written a paper for university on Random Matrices and during my research I've had an interesting idea, let me explain: Wigner's Semicircle Law has seen much advancement since its original proof in 1955, most recently I believe being Tao's proof of the Wigner-Gaudin-Mehta-Dyson conjecture showing universality. No...
I am trying to understand the role of cupom cambial (onshore dollar rate) in relation to the BCB swaps which are domestic NDF settled in real. "The cupom cambial is priced in basis points as an interest rate equal to the spread between the overnight interbank deposit interest rate and the exchange rate variation p...
Is there a platform that ranks spread and outright futures by liquidity and/or by volatility?
I like to download all Chinese ( more than 4000 stocks) stocks daily price data from 1990 to 2020 from Eikon Thomson Reuters datastream. However, I failed to select and download all stocks together. For example, if I download data for a particular sector ( maybe 200-300 stocks), then that it is working. But can not sel...
I am going for an interview for a quant job in two weeks. The interview will focus on my mathamatic knowledge about stochastic process & stochastic calculus, and in the interview I will definately be asked to solve questions of stochastic process (ito/poission, etc..), stochastic calculus, and perhaps to price/model se...
I am going for an interview for a quant job. The interview will focus on my mathematical knowledge about stochastic process & stochastic calculus, and I believe I will definitely be asked to solve questions of stochastic process (Ito/Poisson, etc.), stochastic calculus, and perhaps to price/model several financial inst...
I am going for an interview for a quant job. The interview will focus on my mathematical knowledge about stochastic process & stochastic calculus, and I believe I will definitely be asked to solve questions of stochastic process (Ito/Poisson, etc.), stochastic calculus, and perhaps to price/model several financial inst...
1) DCF analysis: future values of dividends discounted to today's dollars 2) Comparable company analysis: relative value based on peer group ratios: P/E, P/sales, P/active_user, P/EV, P/TAM for SPACs or ventures 3) Terminal value: total value of assets sold minus liabilities paid For more details, see [Company Val...
One of the differences between a CDS and a bond is the funded vs unfounded nature of the two. Given that is the case, at least some portion of the CDS-Bond basis *should* be driven by an implied repo/funding rate for the bond. My question is the following: 1) What are some approaches to calculating the implied fun...
Values=[100, 101, 102.01, 103.03] **Method 1: Sum of the squared differences from the mean** Mean = 101.51 std = sqrt(((100 - 101.51)^2 + (101 - 101.51)^2 + (102 - 101.51)^2 + (103 - 101.51)^2) / 4) = 1.13 **Method 2: Average of the natural log returns** returns = [1.01, 1.01, 1.01] log_returns = [0.0...
Why are these two methods to calculate standard deviation gives very different answers?
This "result" has been widely circulated. I have yet to see it well defined and properly tested and I'm not sure it makes sense to discuss it 'as is'. 1) What is the "S&P 500"? SPY? ES? Something else? 2) What are "regular trading hours"? Cash equity hours? Regular trading hours for ES are very different ([CME link...
I can understand that volatility increases the value of an option when a stock is centred near the strike. Then more volatility means the stock's distribution gets more upside without suffering a greater probability of ending out of the money. But imagine that a stock was far in the money. If I have a distribution th...
Why does an option price increase with volatility in the Black Scholes framework?
I want to find the price of a European call-option under the assumption that the risk-free rate $r$ is time-dependent, i.e. $$ d\beta = r(t)\beta dt \leftrightarrow \beta(T) = e^{\int_0^T r(u)du} $$ I want to express the price in terms of zero-coupon bond prices $P$, where we know that $P(t;T) = \beta(t)/\beta(...
Which papers released in the last 5 years should all quants read to keep up to date on recent developments? See [this question](https://quant.stackexchange.com/q/38886/848) for the best, must read papers of all time. The bar for inclusion for an answer to this question is a bit lower. I'm more interested in papers t...
I have a question regarding Generalized Linear Models and its design matrix. In the GLM framework we say that $h(E(X))=Z\beta$, where $Z\in \mathbb{R}^{M\times (r+1)}$ is called a design matrix, that we assume has full rank. $h(\cdot)$ is the canonical link and $\beta$ is the parameter vector. Now, why does the desi...
## Rough Volatility [Gatheral, Jaisson and Rosenbaum (2018, QF)][1] introduce a fractional Brownian motion into volatility modelling and show its ability to match volatility time series. Importantly, with a Hurst parameter $H<\frac{1}{2}$, sample paths are well ''not so smooth'' anymore. An extensive list of papers...
## Numéraire Change The time-$t$ price of a zero-coupon bond maturing at time $T$ is $$P(t,T)=\mathbb{E}^\mathbb{Q}\left[\exp\left(-\int_t^T r_s\text{d}s\right)\bigg|\mathcal{F}_t\right].$$ Let $\mathbb{Q}$ be our standard risk-neutral probability measure which uses a locally risk-free bank account, $\text dB_t=...
## Rough Volatility [Gatheral, Jaisson and Rosenbaum (2018, QF)][1] introduce a fractional Brownian motion into volatility modelling and show its ability to match volatility time series. Importantly, with a Hurst parameter $H<\frac{1}{2}$, sample paths are well ''not so smooth'' anymore. An extensive list of papers...
## Numéraire Change The time-$t$ price of a zero-coupon bond maturing at time $T$ is $$P(t,T)=\mathbb{E}^\mathbb{Q}\left[\exp\left(-\int_t^T r_s\text{d}s\right)\bigg|\mathcal{F}_t\right].$$ Let $\mathbb{Q}$ be our standard risk-neutral probability measure which uses a locally risk-free bank account, $\text dB_t=...
## Rough Volatility [Gatheral, Jaisson and Rosenbaum (2018, QF)][1] introduce a fractional Brownian motion into volatility modelling and show its ability to match volatility time series. Importantly, with a Hurst parameter $H<\frac{1}{2}$, sample paths are well ''not so smooth'' anymore. An extensive list of papers...
I'm trying to get the Greeks for the PDB Option Contract (Crude Outright - Dated Brent (Platts) Average Price Option): https://www.theice.com/products/26535747/Crude-Outright-Dated-Brent-Platts-Average-Price-Options The specifications on this contract are the followings: Asian Option where the underlying pric...
I can understand that volatility increases the value of an option when a stock is out/at the money. Then more volatility means the stock's distribution gets more upside without suffering a greater probability of ending out of the money. But imagine that a stock was far in the money. If I have a distribution that has ...
Why do the prices of deep in-the-money options increase with volatility in the Black Scholes framework?
Say I'm receiving ticks for AUDUSD. The timestamp for Forex tick data seems to go down to a resolution of .001 second (milliseconds). Example: ``` | Datetime | Bid | Ask | +-----------------------+-------+-------+ |30.10.2011 21:40:55.288|1.07134|1.07077| |30.10.2011 21:40:56.619|1.07133|1.070...
Is there ever a case where there are multiple ticks (different prices) at the same tick timestamp in Forex?
## Rough Volatility [Gatheral, Jaisson and Rosenbaum (2018, QF)][1] introduce a fractional Brownian motion into volatility modelling and show its ability to match volatility time series. Importantly, with a Hurst parameter $H<\frac{1}{2}$, sample paths are well ''not so smooth'' anymore. An extensive list of papers...
I recommend [SSRN](https://papers.ssrn.com/sol3/DisplayJournalBrowse.cfm), where you can search for most recent papers on topics of interest, or by author. The published papers are not always research per se, but can be interesting nonetheless. Here are a few ways to navigate it: - [Publications by Author](https://p...
I answer from a general discrete time/discrete state model point of view. This includes the binomial tree model as a special case. In finite dimensions, you can interpret asset payoffs and returns as vectors and retreat to linear algebra. Suppose you have $N$ states of nature and $J$ assets. Your payoff matrix would...
I answer from a general discrete time/discrete state model point of view. This includes the binomial tree model as a special case. In finite dimensions, you can interpret asset payoffs and returns as vectors and retreat to linear algebra. Suppose you have $N$ states of nature and $J$ assets. Your payoff matrix is \...
The Sharpe ratio is often used as measure to assess risk-adjusted returns of trading strategies. However, there are also other measures that can be used to assess risk-adjusted returns like the Sortino ratio. Are there performance measures that are better suited for mean-reverting strategies, and others that are bet...
Are there better performance measures for mean-reverting vs trend-following trading strategies?
## Rough Volatility [Gatheral, Jaisson and Rosenbaum (2018, QF)][1] further popularise a stream of the literature which emphasises the non-smoothness of volatility paths. These models build on a fractional Brownian motion, with Gatheral et al. proposing a Hurst parameter $H<\frac{1}{2}$ and demonstrating the model's a...
# Rates options # [Lognormal vs Normal Volatilities and Sensitivities in Practice](https://papers.ssrn.com/sol3/papers.cfm?abstract_id=2687742): this is the best paper on pricing Rates Options in negative rates environment that I have read recently (disclaimer: I don't read many papers, so when I say the "best I rea...
I am experimenting with an implementation of the Black-Scholes valuation for call options, and ran into the following questions: 1. Black-Scholes pricing requires a risk-free interest rate. What is 'best practice', i.e. if I were writing a finance paper, where exactly would I get these rates over different time period...
## Numéraire Change The time-$t$ price of a zero-coupon bond maturing at time $T$ is $$P(t,T)=\mathbb{E}^\mathbb{Q}_t\left[\exp\left(-\int_t^T r_s\text{d}s\right)\right].$$ Let $\mathbb{Q}$ be our standard risk-neutral probability measure which uses a locally risk-free bank account, $\text dB_t=r_tB_t\text dt$, ...
When TSLA got added to the SP 500 Index, SPY, VOO, and others must-have gone ahead and bought the stock. My question is, about the process they use? Do they outsource to Banks? Do they buy it slowly prior to rebalancing themselves? How are Creation/Redemption baskets affected? any info/links would be appreciated.
How do ETFs like SPY/VOO handle Rebalance events?
I'm currently paying a 1.25% margin rate. This rate is based on the Fed Funds rate plus a margin. I would like to hedge against the possibility of this margin rate increasing. What is the best/cheapest way to do that? I have access to the futures market but not the market for swaps. Some hedging ideas: * Short 2-...
Please correct me if I am wrong. In the US market, there are pricing differences between TRACE trade prices versus Lehman quotes data. From one side, TRACE prices equal quotation midpoints (<a href="https://www.codecogs.com/eqnedit.php?latex=\frac{Bid&space;Price&space;-&space;Ask&space;Price}{2}" target="_blan...
*"Are there performance measures that are better suited for mean-reverting strategies, and others that are better used for trend-following strategies?"* Do you think the return distributions for these strategies differ? If so, then perhaps there are performance measures more appropriate for each. E.g. I have seen re...
What are good examples of using Big Data for a trading strategy?
I'm trying to find a covariance matrix, so when i use ```returns.cov()``` on my returns variable, I get a good result. Unfortunately, when i want to use ```.cov()``` on my np array converted from pandas df, i must use np.cov(array). But then, i get a completely different matrix, that is not even the dimensions that it ...
What is the difference between np.cov(array) and array.cov()?
I'm wondering how the volatility of basket of constituents priced in different currencies is calculated (without upfront bringing constituent price to basket currency) form volatilities of constituents. Let's consider linear basket $$B = \Sigma_{i=1}^n\omega_i c_if_i$$ where $\Sigma_{i = 1}^n \omega_i = 1$ and $...
Sorry if the question is confusing but I am curious what percentage of options is written by market makers. I know the vast majority of retail investors don't write options; they buy options. I imagine only a few big investors like Warren Buffet write options. Perhaps some hedge funds do. Still is it 90% or 99% of (sto...
I was looking at the well known Longstaff and Schwartz [paper][1] *"Valuing American Options by Simulation: A Simple Least-Squares Approach"*. There are a couple of examples where they applied the early exercise algorithm. Particularly, **section 5** presents the valuation of a Cancelable Index Amortizing Swap. For ...
I was looking at the well known Longstaff and Schwartz [paper][1] *"Valuing American Options by Simulation: A Simple Least-Squares Approach"*. There are a couple of examples where they applied the early exercise algorithm. Particularly, **section 5** presents the valuation of a Cancelable Index Amortizing Swap. For ...
I am an undergrad CS/Finance student, recently been given the opportunity with a team to work on graph theory related problems. I am planning on proposing a study under a CS and a math professor on the applications of Graph theory in the markets. I have not taken too many courses in finance yet, but am keen on learning...
Graph Theory in Finance?
I'm wondering how the volatility of basket of constituents priced in different currencies is calculated (without upfront bringing constituent price to basket currency) form volatilities of constituents. Let's consider linear basket $$B = \Sigma_{i=1}^n\omega_i c_if_i$$ where $\Sigma_{i = 1}^n \omega_i = 1$ and $...
I'm wondering how the volatility of basket of constituents priced in different currencies can be calculated (without upfront bringing constituent price to basket currency) form volatilities of constituents. Let's consider linear basket $$B = \Sigma_{i=1}^n\omega_i c_if_i$$ where $\Sigma_{i = 1}^n \omega_i = 1$ an...
# Rates options # [Lognormal vs Normal Volatilities and Sensitivities in Practice](https://papers.ssrn.com/sol3/papers.cfm?abstract_id=2687742): this is the best paper on pricing Rates Options in negative rates environment that I have read recently (disclaimer: I don't read many papers, so when I say the "best I rea...
I'm wondering how the volatility of basket of constituents priced in different currencies can be calculated (without upfront bringing constituent price to basket currency) form volatilities of constituents. Let's consider linear basket $$B = \Sigma_{i=1}^n\omega_i c_if_i$$ where $\Sigma_{i = 1}^n \omega_i = 1$ an...
How to write the formula for a minimum repayment credit card calculator?
I was looking at the well known Longstaff and Schwartz [paper][1] *"Valuing American Options by Simulation: A Simple Least-Squares Approach"*. There are a couple of examples where they applied the early exercise algorithm. Particularly, **section 5** presents the valuation of a Cancelable Index Amortizing Swap. For ...
In the Basel pillar 2 framework a granularity adjustment is introduced. While the capital requirements in pillar 1 do not take concetrations into account, this is meant to be covered with this adjustment in pillar 2. In [Gordy and Lütkebohmert: Granularity Adjustment for Regulatory Capital Assessment](https://www.ijcb...
I'd like to use QuantLib as a C++ library to price interest rate derivatives, in particular Cap&Floors. To semplify things a little, let's say I have a vector of EURLibor1Y rates for different maturities, which I called *r*, and a constant caplet volatility which I called *vol*. When ever I try to set up a Cap/Floor ...
I'd like to use QuantLib as a C++ library to price interest rate derivatives, in particular Cap&Floors. To semplify things a little, let's say I have a vector of EURLibor1Y rates for different maturities, which I called *r*, and a constant caplet volatility which I called *vol*. When ever I try to set up a Cap/Floor ...
Which papers released in the last five years should all quants read to keep up to date on recent developments? See [this question][1] for the best must-read papers of all time. The bar for inclusion for an answer to this question is a bit lower. I'm more interested in papers that start new trends or give a very good...
What are the recent quantitative finance papers we should all read?
In the Basel pillar 2 framework a granularity adjustment is introduced. While the capital requirements in pillar 1 do not take concetrations into account, this is meant to be covered with this adjustment in pillar 2. In [Gordy and Lütkebohmert: Granularity Adjustment for Regulatory Capital Assessment](https://www.ijcb...
In the Basel pillar 2 framework a granularity adjustment is introduced. While the capital requirements in pillar 1 do not take concetrations into account, this is meant to be covered with this adjustment in pillar 2. In [Gordy and Lütkebohmert: Granularity Adjustment for Regulatory Capital Assessment](https://www.ijcb...
VIX ATM options seem to have delta that is very far from .5 (.18/.82 for 60dte now) with .5 being in 30 territory. Why is this very different from stock options? Why is atm put much less sensitive to the underlying change comparing to a typical stock?
I am writing paper on the profitability of the pairs trading strategy using US equities. I have done a pre-check to see which business sectors have stocks that are cointegrated. The utilities sector is showing the highest number of cointegrations among them. I could not find an academic paper that used this sector. Hen...