instruction stringlengths 15 26.1k |
|---|
I was looking for all the sorts of trading algorithms used in stock market and i came acroos on so called "sniffing" algorithms. However explanation of this concept i found is very poor and ambiguous.
The first explanation states:
- It is a kind of algorithm that searches for another trading algorithms
The se... |
What are the "sniffing" algorithms? |
[![enter image description here][1]][1]
The above chart plots a 300 weekly exponential average. With 52 weeks per year, the indicator would start calculating the EMAVG after 5.77 years, in 2016.
What technique could it be using to be able to calculate EMAVG values for the weeks before 2016?
note: that is a bit... |
I was looking for all the sorts of trading algorithms used in stock market and I came across the so-called "sniffing" algorithms. However, the explanations of this concept I found are very poor and ambiguous.
The first explanation states:
- It is a kind of algorithm that searches for another trading algorithms.
... |
Sniffing (or stalking) algo indeed detects other algorithms. How does that work in practice?
Imagine the order book for a particular equity is: Bid 1 = 99 (size 10,000), Bid 2 = 98 (size 25,000), Bid 3 = 97 (size 30,000), Offer 1 = 101 (size 10,000), Offer 2 = 102 (size 25,000), Offer 3 = 103 (size 30,000).
So i... |
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
\... |
Vanillas, as in ordinary call/put options, are given by their market values.
If you refer to vanillas on strikes and maturities not found on the market, then there are no general useful analytic formulas as far as I know (I might be wrong, of course). It would depend on the chosen form of the local volatility paramet... |
I found this model for floating rate bonds in a book I am reading and I am wondering if it is used anywhere in practice?
$$MV=\frac{\frac{(Index+QM)\cdot FV}{PER}}{\left(1+\frac{Index+DM}{PER}\right)^1}+\frac{\frac{(Index+QM)\cdot FV}{PER}}{\left(1+\frac{Index+DM}{PER}\right)^2}+\cdots+\frac{\frac{(Index+QM)\cdot FV... |
Is this simple model used to calculate the interest rate duration and credit duration of a floating rate note? Other models? |
I am attempting to model long-term electricity prices using today's futures prices. Unlike most futures, electricity is delivered over a period of time (usually a month), rather than at a point in time (a date). The traditional futures equation of F = S * exp(t*(r + u - y)) breaks down here. Rather, the industry refers... |
I need to compile stock price data for ADR and ORD pairs (and the currency between them) into a Pandas dataframe. My initial plan was use Python's requests library and a free Rapid API account to get data from the Bloomberg API, the code for which I've attached below. The issue with this is that the time intervals seem... |
I have a swaption with its underlying swap paying on a monthly basis. I also have swaption volatilities for tenors ranging from 1Y to 20Y and I'm trying to compute volatilities for shorter tenors (3M, 6M and 9M).
Is there any model/bibliography that I could check to extrapolate my market vols in such way?
Thanks! |
I have some ATM swaption volatilities with the following characteristics:
- Tenor of the swap (frequency of payments): 1M (it is the only tenor available for my currency)
- Swap maturities: 1Y, 2Y, 5Y, 10Y, 15Y and 20Y
- Swaption expiries: 1M, 3M, 6M, 1Y, 2Y 5Y and 10Y.
And I'm trying to compute volatilities fo... |
I have some ATM swaption volatilities with the following characteristics:
- Tenor of the swap (frequency of payments): 1M (it is the only tenor available for my currency)
- Swap maturities: 1Y, 2Y, 5Y, 10Y, 15Y and 20Y
- Swaption expiries: 1M, 3M, 6M, 1Y, 2Y 5Y and 10Y.
And I'm trying to compute volatilities fo... |
You should specify the underlying product. I can think of seasonal commodities where an options calendar spread would effectively be on underlyings that are very different. In that case, "What are the factors that work solely to create losses?" could be very different than, say, risks for doing a calendar in something ... |
I have some ATM swaption volatilities with the following characteristics:
- (-IBOR) payment frequency: 1M
- Underlying swap maturities (tail): 1Y, 2Y, 5Y, 10Y, 15Y and 20Y
- Swaption expiries: 1M, 3M, 6M, 1Y, 2Y 5Y and 10Y.
I would like to compute volatilities for swaptions with shorter swap maturities (tails) ... |
What I understand is that risk-neutral measure use Risk-free product as numeraire
and T-Forward measure use Bond Price as numeraire
reading material says, T-forward measure make the pricing behavior comfortable. The reason is it extract discount term(bond price) from Expectation symbol.
But I think although th... |
What is practical meaning of T-forward Measure vs Risk-neutral Measure? |
If the yield-to-maturity (YTM) on a bond is 5%, is the effective annual rate (EAR) on the cash flows associated with the bond also 5%?
I know that YTM does account for the present value of a bond's future coupon payments. Does the effective annual rate on cash flows associated with a bond not reflect this? |
How would the settlement price of SPX be determined if market is closed on the expiration date due to natural disasters/terrorist attacks? |
What is the Id in the ARIMA model in Notes on financial risk of Privault? |
Consider the following SDE \
\
$d X_s= \mu (X_s + b)ds + \sigma X_s d w_s $
where, $\mu$ and $\sigma$ are constant positive parameters, b>0 and $X_0$ is the initial position.
If b=0, then the above equation is a GBM, so the distribution of $X_t$ at time t is lognormally distributed.
If b>0, can I say anythin... |
## Simplifying the Drift
As will all linear SDEs, let $Y_t=e^{-\mu t}X_t$. Then,
\begin{align*}
\text{d}Y_t &=-\mu e^{-\mu t}X_t\text{d}t+e^{-\mu t}\text{d}X_t \\
&=\mu b e^{-\mu t}\text{d}t+\sigma Y_t\text{d}W_t.
\end{align*}
## Product Rule
Consider the geometric Brownian motion $Z_t$ with $\text{d}Z_t=\si... |
## Simplifying the Drift
As will all linear SDEs, let $Y_t=e^{-\mu t}X_t$. Then,
\begin{align*}
\text{d}Y_t &=-\mu e^{-\mu t}X_t\text{d}t+e^{-\mu t}\text{d}X_t \\
&=\mu b e^{-\mu t}\text{d}t+\sigma Y_t\text{d}W_t.
\end{align*}
## Product Rule
Consider the geometric Brownian motion $Z_t$ with $\text{d}Z_t=\si... |
What are the "sniffing" or "stalking" algorithms? |
I thought cost of hedging/going short on a currency with a forward was given by F/S-1 but it seems the author states 0.25% (see below). Am I missing anything (transaction costs, balance sheet costs, etc.)?
25 Feb data
EURUSD spot = 1.2200
3m EURUSD points = 5.0, which implies forward = 1.2205
extracted from ... |
## Simplifying the Drift
As will all linear SDEs, let $Y_t=e^{-\mu t}X_t$. Then,
\begin{align*}
\text{d}Y_t &=-\mu e^{-\mu t}X_t\text{d}t+e^{-\mu t}\text{d}X_t \\
&=\mu b e^{-\mu t}\text{d}t+\sigma Y_t\text{d}W_t.
\end{align*}
## Product Rule
Consider the geometric Brownian motion $Z_t$ with $\text{d}Z_t=\si... |
I am attempting to model long-term electricity prices using today's futures prices. Unlike most futures, electricity is delivered over a period of time (usually a month), rather than at a point in time (a date). The traditional futures equation of F = S * exp(t*(r + u - y)) breaks down here. Rather, the industry refers... |
I'm trying to calculate the interest rate $r$ from the put-call parity.\
As per hull, put-call parity is given by the below equation.
$c + Ke^{-rT} = p + S_{0}$
where:\
$c$ = current call option price with stike=$K$\
$p$ = current put option price with stike=$K$\
$K$ = stirke price\
$S_{0}$ = spot price\... |
>If b>0, can I say anything about the distribution of at a later time t?
### Yes - The solution is in Kloeden and Platen
You want to refer to section 4.4 of *Numerical solutions of stochastic differential equations* by Kloeden and Platen (which is my go-to book for SDEs). Under the section on *linear SDEs with m... |
I am attempting to model long-term electricity prices using today's futures prices. Unlike most futures, electricity is delivered over a period of time (usually a month), rather than at a point in time (a date). The traditional futures equation of F = S * exp(t*(r + u - y)) breaks down here. Rather, the industry refers... |
I need to compile stock price data for ADR and ORD pairs (and the currency between them) into a Pandas dataframe. I just started using the Alpha Vantage API for this, which works great for getting the US-listed stock prices (at the minute timescale) and the currency rate, but I haven't figured out how to get the foreig... |
My question is quick and simple. However, I would like to use this answer to further my understanding of bonds and yields.
If the YTM on a 10yr Note yesterday was 1.00% and the YTM on the same 10yr Note today is 1.10%, did the yield increase by:
1. 0.10%, i.e. (1.10% - 1.00% = 0.10% ?
2. 10.0%, i.e. (1.10%/1.0... |
What is the best way to interpret changes in Treasury yields? |
This is a very profound question, actually.
Definitely not 2. This breaks when rates become zero and negative. This works for prices, not for rates.
In practice, most people use 1: the yield changed by 0.10% (10 basis points).
This is not ideal either, because what if you're trying to compare this change to a ... |
*Is the time series intraday API only for US equity?* **It only works for equities listed on US exchanges.**
AlphaVantage computes intraday data directly from the market-aggregated data feed of the Securities Information Processors (SIP), which is also written in the [documentation](https://www.alphavantage.co/docum... |
*What does yield actually represent?* - it's just the return on the bond subject to a number of (unrealistic) assumptions. Perhaps a better way to think about it is as a quotation convention like implied volatility.
As an aside, people who think about bonds in price terms are generally those trading credit risky bo... |
This is a very profound question, actually.
Definitely not 2. This breaks when rates become zero and negative. This works for prices, not for rates. (I wrote more on it [here][1].)
In practice, most people use 1: the yield changed by 0.10% (10 basis points).
This is not ideal either, because what if you're try... |
This is a very profound question, actually.
Definitely not 2. This breaks when rates become zero and negative. This works for prices, not for rates. (I wrote more on it [here][1].)
In practice, most people use 1: the yield changed by 0.10% (10 basis points).
This is not ideal either, because what if you're try... |
This is a very profound question, actually.
Definitely not 2. This breaks when rates become zero and negative. This works for prices, not for rates. (I wrote more on it [here][1].)
In practice, most people use 1: the yield changed by 0.10% (10 basis points).
This is not ideal either, because what if you're try... |
Consider the following stochastic differential equation (SDE)
$$d X_s= \mu (X_s + b)ds + \sigma X_s d w_s $$
where constants $\mu, \sigma, b > 0$ and initial position $X_0$ are given.
If $b=0$, then the above equation is a geometric Brownian motion (GBM) and the distribution of $X_t$ at time $t$ is lognormall... |
*What does yield actually represent?* - it's just the return on the bond subject to a number of (unrealistic) assumptions. Perhaps a better way to think about it is as a quotation convention like implied volatility.
As an aside, people who think about bonds in price terms are generally those trading credit risky bo... |
I am currently working on a project where I am testing a Pairs Trading Strategy based on Cointegration.
In this strategy I am considering to trade a couple of hundred stock pairs every day over a time frame of 3 years. According to this strategy I am holding my trades open until either the take profit condition (reve... |
How to compute returns of a Pairs Trading Strategy with different holding periods? |
Do passive ETF fund managers care about portfolio metrics such as Sharpe ratio and Sortino ratio?
I understand hedge fund managers care about these risk metrics for their investors. What about the managers who manage passive ETFs such as SPY, QQQ? Do these metrics matter to their performances? |
Do passive ETF fund managers care about profolio metric such sharpe ratios and sortino ratio? |
**Fractional differentiation** (or differencing) is a technique that transforms an input series to a stationary series while retaining "long-term" memory.
Consider the following example based on S&P 500 prices starting with 2000-01-01.
[![enter image description here][1]][1]
[![enter image description here][2]... |
**Fractional differentiation** (or differencing) is a technique that transforms an input series to a stationary series while retaining "long-term" memory.
Consider the following example based on S&P 500 closing prices.
[![enter image description here][1]][1]
[![enter image description here][2]][2]
The daily... |
A professional trader said that the way is not to short VIX or other volatility products, but to
short the difference between implied volatility and realized volatility of SPX
This has to do with VRP Variance risk premium but what means selling the difference?
The pro trader trades OTM bull put spreads in SPX.
It i... |
Like it or not, millions of people are now looking to r/wallstreetbets for not only memes but to view shared investment research.
I've learned a lot about stock options in the past year, but I'd like to quote a "due dilligence" post on wallstreetbets [claiming GME was shorted 33,000,000+ non-existent shares and it's i... |
*C: Is there any other way?* - yes, borrow the shares and go short.
*Does such a scenario [short squeeze] damage the market? It is something bad that shouldn't exist?* - how do you define that?
re B - your options could be cash-settled. Doesn't necessarily affect the seller's hedging strategy, just pointing it o... |
Yes, you can check the paper Entropic Portfolio Optimization: a Disciplined Convex Programming Framework in [SSRN][1].
[1]: https://papers.ssrn.com/sol3/papers.cfm?abstract_id=3792520 |
Hey where I could find theory of option pricing in incomplete markets? I know that there we have not one price, but interval of arbitrage-free prices and I would like to read more about it and I need some references. Can anyone help? |
"Dealers typically use repo to fund both their cash Treasury positions and their lending to clients through Treasury reverse repos. Thus, the ability and willingness to engage in repo, which increases the size of dealers’ balance sheets, will affect their willingness to take on additional inventories and provide lendin... |
I am currently writing a small paper comparing the Black-Scholes formula to the Bachelier model.
However I am wondering how exactly I should compare the two models?
Obviously I am comparing the prices given by the two models, but the whole point of implementing the Bachelier model (in a context of energy option sp... |
Method of comparing two option pricing models? |
"Dealers typically use repo to fund both their cash Treasury positions and their lending to clients through Treasury reverse repos. Thus, the ability and willingness to engage in repo, which increases the size of dealers’ balance sheets, will affect their willingness to take on additional inventories and provide lendin... |
Here are graphs of implied volatility and local volatility. Our prof mentioned that we can observe that the short end low strike region has some smile arbitrage. I would like to know how?
Thanks![![enter image description here][1]][1]
[1]: https://i.stack.imgur.com/lNJpV.png |
Can we observe smile arbitrage from the implied and local volatility? |
This is an extension of problem 3.16 in Mark Joshi's book. My answer is to avoid Thursday, and all other weekdays are equally good. The probability that the fourth business day is Thursday is 3/7 (when the month starts with Saturday, Sunday and Monday). The probability that the fourth business day is any other weekday ... |
What day of a week should we pick something to happen to minimize it happening on the fourth business day of the month? |
Does anyone know how can I get the historical, daily NAV of a specific ETF, for example SPD or IWM?
and how can I get the number of daily transaction of a specific ETF? Yahoo finance has daily opening, high, low, closing values, but no NAV. |
Under some special condition, Sharpe ratio can be annualized by multiply $\sqrt{252}$, Since daily Sharpe ratio ($\frac{mean(r)}{std(r)}*T$) follows student T distribution with degree of freedom T-1, then what about annual Sharpe ratio? I thought it should follows student T as well with degree of freedom $\frac{T}{\sqr... |
Did annual Sharpe ratio follows T distribution? |
"Typically, Australian banks pay a small premium to swap foreign currency into Australian dollars. This premium is also referred to as the basis, which is the difference between the implied cost of obtaining Australian dollars in the FX swap market and the cost of obtaining Australian dollars onshore."
https://www... |
OK, so PHYSICAL commodities typically have a term structure for one of two basic reasons:
(1) that commodity is seasonal in nature. Take a look at the NatGas strip for the next 5 years. Ditto vagaries in the harvest of Brazilian coffee, Iowa wheat, or Florida FCOJ (a la Trading Places).
(2) sometimes, that term ... |
I don't think that article is correct in the explanation.
The FX basis means the difference between the rate you would get from trading a spot vs forward fx trade versus just outright borrowing money.
For example, as bank I could:
Scenario 1:
- Borrow currency X (which I don't have but want)
- Lend cu... |
For instance, are there limits to how concentrated a portfolio in terms of industry allocation?
If so, where can I find such information about the constraints each fund has? |
Do equity mutual funds typically have industry-level diversification constraints? |
The classical **Net Volume** indicator operates on OHLCV bars, not on raw trades.
* Uptick is registered when the bar's close is higher than open
* Downtick is registered when the bar's close is lower than open
* Signed (directional) volume is positive on uptick, negative on downtick
* Net Volume is the cumulativ... |
Can you give me a concrete example of a self financing portfolio which gives arbitrage opportunity in the two-dimensional Black-Scholes model?
By the two-dimensional Black-Scholes model I mean
$$dS_{1}\left(t\right)=S_{1}\left(t\right)\left[\mu_{1}dt+\sigma_{1}dW\left(t\right)\right]$$
$$dS_{2}\left(t\right)=S_... |
Is portfolio allocation not circular reasoning?
Say we have a portfolio manager, Michael, and a risk manager, Vito. Michael has a portfolio and would like to determine the optimal allocation of his portfolio. So Michael goes to Vito and says "hey Vito, what is the optimal allocation?". Vito then sets up and solves a... |
Portfolio allocation question: is it not circular reasoning? |
[![enter image description here][1]][1]
So i've run a regression for a stock and these are the results. I was wondering if I'm right in inferring that because the SMB coefficient is negative, this particular stock I've chosen has a large cap, whilst the HML of 0.35 indicates that the stock is in fact a value stock wit... |
I was looking for bad things waiting to happen on the Ides of March, and the next [Major Foreign Holders of Treasury Securities](https://ticdata.treasury.gov/Publish/mfh.txt) report came up as a candidate. It is due on [March 15th, 2021](https://www.treasury.gov/resource-center/data-chart-center/tic/Pages/release-dates... |
I appreciate what a repo/reverse repo transaction is, but I'm struggling to understand exactly how the cost of funding trades via repo works from a practical point of view for a bond trader.
**Current understanding**
1. *Going long*: if a trader wants to go long, they finance the trade in the repo market by borr... |
What are the practical costs of repo for a bond trading desk? |
I appreciate what a repo/reverse repo transaction is, but I'm struggling to understand exactly how the cost of funding trades via repo works from a practical point of view for a bond trader.
**Current understanding**
1. *Going long*: if a trader wants to go long, they finance the trade in the repo market by borr... |
I need to build a Monte Carlo simulation model that does 10 iterations on the interest rate tree. I need to identify the interest rate given a sequence of moving up and down the interest rate tree. I managed to create an IF statement until i=2, however it gets tricky on i=3 onwards.
Any suggestions? I was told to us... |
Do you have an existing brokerage account or perhaps a data provider you're subscribed to? I was able to previously receive a complete list of stocks for the full Equities universe on all the US exchanges from algoseek.com
|
I'm working on the calibration of the Heston Stochastic Volatility Model for some FX option data for my bachelor thesis and I was asked "Why should people use Heston instead of other simple approach like Vanna-Volga (VV)?".
According to my research, the greatest point in favor of stochastic volatility models is that... |
I need to build a Monte Carlo simulation model that does 10 iterations on the interest rate tree. I need to identify the interest rate given a sequence of moving up and down the interest rate tree. I managed to create an IF statement until i=2, however it gets tricky on i=3 onwards.
Any suggestions? I was told to us... |
So for Black Scholes we know that the PDE is the follwing: ${\frac {\partial V}{\partial t}}+{\frac {1}{2}}\sigma ^{2}S^{2}{\frac {\partial ^{2}V}{\partial S^{2}}}=rV-rS{\frac {\partial V}{\partial S}}$. The boundary conditions for that equations then are the following:
\begin{aligned}C(0,t)&=0{\text{ for all }}... |
Can we proof the boundary condition for the Black Scholes derived from a replicating Portfolio? |
Given Heston model parameters calibrated from vanilla put/call options it is possible to imply a volatility surface by pricing calls or puts for different strikes and maturities and solving the inverse BS equation to find the corresponding black volatilities. Clearly, by construction, using this volatility in the BS fo... |
Is pricing options using the volatility surface implied by the Heston model equivalent to pricing using the Heston model directly for all options? |
Should an ITM American put spread be equal to its intrinsic value as the options could then be exercised for the intrinsic value instantly? There is not more the spread would be able to make. This isn't observed in practise though. Wondering if someone could clarify. |
I am using QuantLib in Python to estimate yield curves using the Nelson-Siegel-Svensson (NSS) model with zero-rates as input. Since the NSS model in QuantLib uses the discount function to estimate the parameters I simply use the zero-rates as bonds with no interest-rate. However, using the code I have noticed that for ... |
How do I get European tick size or historical intraday opening and closing prices? |
Just as an exercise I'm trying to follow this paper: https://arxiv.org/ftp/arxiv/papers/1502/1502.02963.pdf
In the section 2.2 it calculates the value of a Call using the characteristic function of the underlying under Black-Scholes dynamics.
I'm using Python, and strangely my result seems to be exactly 1/2 of th... |
Heston model with underlying BS dynamics always gives 1/2 of the right value, what am I doing wrong? |
How can one show that the paths of the standard Wiener process are continuous in $T$ with
probability one? Can we just proof it with the assumption of independence ? Thank You in advance! |
How are "official" FX rates calculated? Are these given by an average across all big dealers or brokerage systems (eg EBS, Reuters)? |
I have got a question about DV01 neutral trades. Generally speaking: if you perform a 2s10s steepener on a generic govt yield curve, would convexity be a risk? If so, in what measures?
Technically, as we are DV01 neutral, I imagine that convexity is also somewhat mitigated, yet I fail to understand where this conve... |
what do metrics and indicators mean in the finance context? Like trading of MBS products |
This might be a simple question, but I'm having trouble with it.
Consider the Cauchy problem with final condition.
\begin{equation}
\begin{cases}
\frac{\partial u}{\partial t}(t,x) + \mathcal{L}u(t,x) + k(t,x)u(t,x) = g(t,x) &\textit{in}\quad\left[0,T\right]\times\mathbb{R}\\
u(T,x)=\phi(x)&\textit{in}\quad\math... |
I am trying to understand the relationship between the risk-free rate $R_f$ and the earnings yield of equities.
I have read that an increase in $R_f$ leads directly to a decrease in the equity risk premium $ERP$. I have also read that an increase in the risk-free rate leads to an increase in the earnings yield *by ... |
I saw in a paper for specifically the Northfield equity risk model that when constructing their factors they use the standard, time series regression to get each stock’s beta to a specific factor and then a cross sectional regression at each time point to get the factor risk premium.
As part of the cross sectional ... |
I saw in a paper for specifically the Northfield equity risk model that when constructing their factors they use the standard, time series regression to get each stock’s beta to a specific factor and then a cross sectional regression at each time point to get the factor risk premium.
As part of the cross sectional ... |
Under some special condition, Sharpe ratio can be annualized by multiply $\sqrt{252}$, Since daily Sharpe ratio ($\frac{mean(r)}{std(r)}*\sqrt{T}$) follows student T distribution with degree of freedom T-1, then what about annual Sharpe ratio? I thought it should follows student T as well with degree of freedom $\frac{... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.