instruction
stringlengths
15
26.1k
As far as I understand, perpetual contracts are like regular futures except they can be held open indefinitely. However, I dont know about any other brokers out there, but in binance, when you open a perpetual contract, you do so by interacting with an order book, meaning, for every position you open there is an opposi...
What happens to the perpetual future counterpart when my position is closed? (BINANCE FUTURES)
Suppose we sell a 3m JPY swap with spot start date, and we are able to back out the 3m FX-OIS basis, using 3m JPY OIS (3m TONIA) and 3m USD OIS (3m Fed Fund rate), using covered interest parity formula. 1) What does it mean to sell 3m JPY swap? Do we buy USD, sell JPY in the near leg, and in the far leg (i.e. 3m), ...
Suppose we sell a 3m JPY swap with spot start date, and we are able to back out the 3m implied JPY forward points (hence swap points), using 3m JPY OIS (3m TONIA) and 3m USD OIS (3m Fed Fund rate), using covered interest parity formula. 1) What does it mean to sell 3m JPY swap? Do we buy USD, sell JPY in the near l...
Suppose we sell a 3m JPY swap with spot start date, and we are able to back out the 3m implied JPY forward points (hence swap points), using 3m JPY OIS (3m TONIA) and 3m USD OIS (3m Fed Fund rate), using covered interest parity formula. 1) What does it mean to sell 3m JPY swap? Do we buy USD, sell JPY in the near l...
When pricing a bond via a short rate model on a tree, it seems natural to include intermediate time steps in addition to those corresponding to cashflow dates (i.e. for bonds with American style embedded options). One thing which isn't clear to me is how to handle the case of floating coupons when there are multiple...
Companies buy options to reduce the variability in future cash flows. Institutional investors invest in portfolios to maximize return for a fixed amount of risk. If an investor owns stock in company A whose cash flows are negatively correlated with the price of commodity B, then investors can reduce risk by investin...
Why will companies trade options rather than the investors investing in those companies?
Why do companies trade options?
Companies buy options to reduce the variability in future cash flows. Institutional investors invest in portfolios to maximize return for a fixed amount of risk. If an investor owns stock in company A whose cash flows are negatively correlated with the price of commodity B, then investors can reduce risk by investin...
Companies buy options to reduce the variability in future cash flows. Institutional investors invest in portfolios to maximize return for a fixed amount of risk. If an investor owns stock in company A whose cash flows are negatively correlated with the price of commodity B, then he can reduce risk by investing in co...
It is very difficult to source a rigorous answer to the above question. I know the answer is: ``` Ann. Covariance = covariance * frequency ``` Can anyone explain the mathematical idea behind this formula?
How do I annualise a covariance matrix?
Companies buy options to reduce the variability in future cash flows. Institutional investors invest in portfolios to maximize return for a fixed amount of risk. If an investor owns stock in company A whose cash flows are negatively correlated with the price of commodity B, then he can reduce risk by investing in co...
I am looking to compute the quadratic variation of $$S_t = S_0e^{\sigma B_t}$$ where $B_t$ is Brownian Motion. Applying Itô's lemma, I having the following $$(dS_t)^2 = S_0^2\sigma^2e^{2\sigma B_t}dt$$ Now here is where I am a bit confused... how is this actually computed? I know that the following can't be solved...
I am doing some standard svd calibration to mark market implied vols in difference to a previous volatility surface. For longer term maturities where there is no market data, I am extrapolating ATM using forward variance which leads to very high moves compared to consensus data. Exact behavior will be: if my last ob...
[![enter image description here][1]][1] [1]: https://i.stack.imgur.com/AvPJk.png This architecture is designed to minimize latency with the help of busy-spinning and CPU affinity locks(meaning each producer/consumer thread running in only one core), preventing a thread from wandering between CPUs and losing t...
I try to understand the equal risk contribution (ERC) portfolio as described in [On the Properties of Equally-Weighted Risk Contributions Portfolios](https://www.researchgate.net/publication/45397778_On_the_Properties_of_Equally-Weighted_Risk_Contributions_Portfolios?enrichId=rgreq-e57c2f5c85f2f372662ff322fd9faf92-XXX&...
I have attended a conference where one speaker mentioned that the market standard to price FX and Equity derivatives is now the Local-Stochastic volatility model. I understand this class of model is a mix of local volatility and stochastic volatility models but is the pricing done always via Monte Carlo simulation? ...
Today I have been struggling with something that someone here for sure has already encountered. I have a corporate issuer with a set of fixed coupon bonds (maturities between 1.5 to 20+ Years, luckily same coupon frequency), and I would like to estimate a Zero-Coupon Curve out of it. However, this is not like the ...
I am wondering how the IRS daily PnL will normally be attributed from trader's/market risk perspective. Will it be broken down into three parts daily carry (Daily interest accrual), daily roll-down (Assuming static yield curve rolling down one day) and the daily change in yield curve (Any remaining change in the NP...
Why do rating grades have different PD ranges?
I have a minute-by-minute price series of a stock. I would like to calculate the daily volatility or standard deviation of the stock's returns. One way to do so is to get the end-of-day prices (i.e. daily close prices), calculate daily returns, and then calculate the standard deviation of these daily returns. The...
What are the advantages and disadvantages of converting standard deviation of higher-frequency returns to a lower sampling frequency?
I'm planning to start a strategy on SP500 hedging losses on USDJPY, because USD usually goes the opposite of SP500. I'm also considering other symbols (USDCAD, USDCHF, USDX) I just took the charts of SP500 and USDJPY and they are effectively quite uncorrelated, exception for 2008 crisis on SP500...I noticed that during...
Uncorrelation between SP500 and USDJPY?
I'm planning to start a strategy on SP500 hedging losses on USDJPY, because USD usually goes the opposite of SP500. I'm also considering other symbols (USDCAD, USDCHF, USDX) I just took the charts of SP500 and USDJPY and they are effectively quite uncorrelated, exception for 2008 crisis on SP500...I noticed that during...
You are confusing several different factors and words. First, I think the word you are looking for is "anti-correlated". And while at time's the inverse relationship holds, it is by no means bullet proof. Pull up a chart that includes the 1990s. There's no relationship there either. Now why did USDJPY collapse durin...
From books it looks like market standards to price IR options, like swaptions, are SABR, LMM or mix of the two (SABR-LMM). But LMM models the forward Libor rate. What will happen to it once Libro ceases to exists and only SOFR is traded in the market? Will this model still be valid somehow? Since SOFR is already he...
The industry will continue to use SABR and LMM, although in slightly modified versions. You may want to check the following papers to see how the extended model dynamics look like: [SABR smiles for RFR caplets][1], [Looking Forward to Backward-Looking Rates: A Modeling Framework for Term Rates Replacing LIBOR][2] and [...
I am looking for a guide for build correctly complex C++ project such as those for quantitative finance and financial engineering such as QuantLib and Open Source Risk Engine. I can configure correctly QuantLib in VS Code following standard instructions available on quantlib.org but for personal preference I would pref...
I am looking for a guide for build correctly complex C++ projects such as those for quantitative finance and financial engineering such as QuantLib and Open Source Risk Engine. I can configure correctly QuantLib in Visual Studio Community following standard instructions available at https://www.quantlib.org/install/vc1...
Question on STIR. Suppose we sell a 3m JPY swap with spot start date, and we are able to back out the 3m implied JPY forward points (hence swap points), using 3m JPY OIS (3m TONIA) and 3m USD OIS (3m Fed Fund rate), using covered interest parity formula. 1) What does it mean to sell 3m JPY swap? Do we buy USD, s...
As you suspect, you have a mistake. You say that: > $$R_{average} = W^{1/n} = (\prod_{i = 1..n}R_{i})^{1/n} = {1\over n} \sum_{i = 1..n}log(R_{i}).$$ Notice that you took a log and kept the equation sign. What you really meant is $$\log R_{average} = {1\over n} \sum_{i = 1..n}log(R_{i}).$$ So you don't really ...
There are several relatively recent papers that use topological methods (specifically persistent homology) to study financial time series. 1. Gidea, Marian, and Yuri Katz. “Topological data analysis of financial time series: Landscapes of crashes.” Physica A: Statistical Mechanics and its Applications 491 (2018): 8...
I am reading Stochastic Calculus Bk 2. I am trying to understand the below two concepts: 1. Topic 8.3.3 Analytical Characterization of the Put price on Page351 2. Topic 8.3.4 Probabilistic Characterization of the Put price on Page353 Can someone please help me understand the difference between the above two...
I am reading Stochastic Calculus Bk 2. I am trying to understand the below two concepts: 1. Topic 8.3.3 Analytical Characterization of the Put price on Page351 2. Topic 8.3.4 Probabilistic Characterization of the Put price on Page353 Can someone please help me understand the difference between the above two...
I am reading Shreve's Stochastic Calculus for Finance II: Continuous-Time Models. I am trying to understand the below two concepts: 1. Topic 8.3.3 Analytical Characterization of the Put price on Page 351 2. Topic 8.3.4 Probabilistic Characterization of the Put price on Page 353 Can someone please help me un...
Question on STIR. Suppose we sell a 3m JPY swap with spot start date, and we are able to back out the 3m implied JPY forward points (hence swap points), using 3m JPY OIS (3m TONA) and 3m USD OIS (3m Fed Fund rate), using covered interest parity formula. 1) What does it mean to sell 3m JPY swap? Do we buy USD, se...
> why do you reduce or flatten the volatility surface in order to > calibrate the stochastic volatility ? This is a crude way of creating a partial volsurface, which is lower than the actual market vol surface. In the LSV process, this is then merged with a partial vol surface created from the local vol surface. Th...
From books it looks like market standards to price IR options, like swaptions, are SABR, LMM or mix of the two (SABR-LMM). But LMM models the forward LIBOR rate. What will happen to it once LIBOR ceases to exists and only SOFR is traded in the market? Will this model still be valid somehow? Since SOFR is already he...
> why do you reduce or flatten the volatility surface in order to > calibrate the stochastic volatility ? This is a crude way of creating a partial volsurface, which is lower than the actual market vol surface. In the LSV process*, this is then merged with a partial vol surface created from the local vol surface. T...
> why do you reduce or flatten the volatility surface in order to > calibrate the stochastic volatility ? This is a crude way of creating a partial volsurface, which is lower than the actual market vol surface. In the LSV process*, this is then merged with a partial vol surface created from the local vol surface. T...
i did a Monte Carlo simulation and evaluated my portfolio with it. I also used different Strike and Weights for the Put options. Now to my problem: All statistcal measures (like expected return, volatility) decrease if i put more weights in my put option. This makes sense, however the Value at Risk doesnt align. Since ...
I've used de Prado's trend scanning labels but now I want to try the triple barrier method idea. I understand the rough set up, and I understand the logic behind it. However, what I don't understand is this: Do I have an observation on every single timestep, with the label being -1/0/1 depending on which barrier is ...
Lopez de Prado's Triple Barrier Method - do you reset the barriers on every timestep, or only when you reach a hi/lo/no barrier hit?
I did a Monte Carlo simulation to evaluate my portfolio. I used different Strikes and Weights for the Put options. Now to my problem: All statistical measures (like expected return, volatility) decrease if I put more weight in my put option. This makes sense, however the Value at Risk doesnt align! Since I am basically...
I tried to compare yahoo finance forex quotes against hourly quotes I acquired some other data source. I shifted data hour by hour and measured correlations between them. Surprisingly, the results was something like this: ``` 1 0.17399579680260843 2 0.17174534599697275 3 0.1724193820726977 4 0.173302277889905 5...
I tried to compare yahoo finance forex quotes against hourly quotes I acquired from some other data source. I shifted data hour by hour and measured correlations between them. Surprisingly, the results was something like this: ``` 1 0.17399579680260843 2 0.17174534599697275 3 0.1724193820726977 4 0.1733022778899...
I tried to compare yahoo finance forex quotes against hourly quotes I acquired from some other data source. I shifted data hour by hour and measured correlations between them. Surprisingly, the results was something like this: ``` 1 0.17399579680260843 2 0.17174534599697275 3 0.1724193820726977 4 0.1733022778899...
I tried to compare yahoo finance forex quotes against hourly quotes I acquired from some other data source. I shifted data hour by hour and measured correlations between them. Surprisingly, the results was something like this: ``` 1 0.17399579680260843 2 0.17174534599697275 3 0.1724193820726977 4 0.1733022778899...
I tried to compare yahoo finance forex quotes against hourly quotes I acquired from some other data source. I shifted data hour by hour and measured correlations between them. Surprisingly, the results was something like this: ``` 1 0.17399579680260843 2 0.17174534599697275 3 0.1724193820726977 4 0.1733022778899...
Most perpetual futures offered by crypto exchanges employ a funding payment mechanism, that acts to periodically return the price of the perpetual to the underlying index price. The mechanism is broadly outlined [here][1]. How does the funding mechanism ensure the perpetual price returns to the price of the underly...
Is there a word or phrase with similar meaning to bond yield, but meaning yield on the actual price paid for bond some time ago?
Is there a word or phrase with similar meaning to bond yield, but meaning yield on the actual price paid for a bond some time ago?
The generally accepted accounting equation is > Assets = Liabilities + Equity, or, put simply, stuff owned = stuff owed. I can see how Prepaid expenses are zero-sum assets initially because the credit is posted to the cash/bank account and the debit is posted to the prepaid account (both current assets). But wh...
Following are some companies with negative Retained Earnings to Total Assets Ratios. ``` ticker industry retained_earnings total_assets RE_TA 1: STCN Integrated Freight & Logistics -7494.1020 147.299000 -50.876802 2: MACK Biotechnology -54...
Consider a derivative which depends on $n$ assets with price vector $X=(X^1,\dots,X^n)$. The derivative value $V_t$ is given by the function $v(t,X)$, so that the hedge ratios for the hedging portfolio are given by $\partial_iv(t,X)$ for each asset $X^i$ for $i=1,\dots,n$. **Is there anything we can say in general abo...
Is it possible to obtain a list of all of the stock tickers that have ever been used in both NYSE and NASDAQ? I have tried searching the web and might have a potential solution with Mathematica's ```FinancialData``` package, but I am not sure if this is the best solution. For those who are curious, I am generating a li...
Following are some companies with negative Retained Earnings to Total Assets Ratios. ``` ticker industry retained_earnings total_assets RE_TA 1: STCN Integrated Freight & Logistics -7494.1020 147.299000 -50.876802 2: MACK Biotechnology -54...
You are specifically not considering the fair market price of the bond now, but only what you paid for it, and how much coupon it has paid out so far. This ratio could be termed "realized holding period return". Correspondingly, the change in the market price of the bond could be termed "**un**realized holding period...
You are specifically not considering the fair market price of the bond now, but only what you paid for it, and how much coupon/amortization it has paid out so far, no matter when. This ratio could be termed "realized holding period return". Correspondingly, the change in the market price of the bond could be termed "*...
You are specifically not considering the fair market price of the bond now, but only what you paid for it, and how much coupon/amortization it has paid out so far, no matter when. This ratio could be termed "realized holding period return". Correspondingly, the change in the market price of the bond could be termed "*...
If I understand correctly, 6M carry in a fixed-floating interest rate swap should be the difference between the fixed and floating leg. When I read this on Page 2: https://corporate.nordea.com/api/research/attachment/2796 The 6M carry is DIVIDED by DV01. Why is this? I can see why you would multiply by the DV01 ...
Why is carry divided by DV01 to scale it?
I was reading a research article and I'm not really understanding why. Is it to do with the option premium being priced in at the beginning?
Why do bonds with a shorter next call dates have shorter extension risk?
Perpetual contracts are supposed to track the spot prices through the *funding* mechanism. Typically, if the future has traded above the spot in the last averaging period used to compute the funding, then the funding will be positive, and the long will pay the short exactly at the end of the averaging period. it is eno...
I am currently stuck with the following problem: You need to price the following exotic option, where the share price of BASF (BAS) is the underlying: • Time to maturity: 2 years • Right to exercise: Only at maturity • Payoffs: You receive or pay the minimum of ( − ) and ( − ), where is the stock price at mat...
I am currently stuck with the following problem: You need to price the following exotic option, where the share price of Stock ABC is the underlying: • Time to maturity: 2 years • Right to exercise: Only at maturity • Payoffs: You receive or pay the minimum of ( − ) and ( − ), where is the stock price at matu...
I will refer to Risk-Free Rates (RFR) for greater generality, instead of OIS or SOFR. There are two dimensions to your question, I will treat them separately. > **How to adjust a LIBOR vol surface to price RFR options?** When lacking RFR option quotes, I think there is no evident solution. Some pointers I would ...
For homework, I think that people in these forums like when the author explains his current progress/ideas/intuitions. Try to follow the following steps: 1. Create a plot with axes: $x=S_T, y=\text{payoff}$. 2. Draw the individual payoffs. 3. Use the previous lines in order to determine the global payoff of ...
I am currently stuck with the following problem: You need to price the following exotic option, where the share price of Stock ABC is the underlying: • Time to maturity: 2 years • Right to exercise: Only at maturity • Payoffs: You receive or pay the minimum of ( − ) and ( − ), where is the stock price a...
Is there any categorical encoding technique for credit ratings that take into account the kind of non linear nature of the notches of the credit ratings? The literature standard is the ordinal one unless I have missed something. Some other papers have tried probit and logistic/exponential encoding (?) Any ideas are ...
### Problem I want to apply the Kelly criterion to asset returns, so that I know how much to hold of each, ideally (and how much I should keep as a cash reserve). As far as I understand the Kelly criterion, it's about maximizing the expected logarithmic returns - which computes as $$\frac{1}{n}\sum_{t=1}^{n} log(...
Can I apply the Kelly criterion directly, without fitting any distributions?
### Problem I want to apply the Kelly criterion to asset returns, so that I know how much to hold of each, ideally (and how much I should keep as a cash reserve). As far as I understand the Kelly criterion, it's about maximizing the expected logarithmic returns - which computes as $$\frac{1}{n}\sum_{t=1}^{n} log(...
**Goal:** I'm looking to see if it's possible to programatically detect "measured moves" on candlestick data. The price data I am using is successfully retrieved from the TD Ameritrade platform using the [unofficial Python API][1]. **Details:** For an "upwards measured move", this is where the price reaches bo...
Can anybody, in the most intuitive way possible explain why there is an FVA DVA overlap, specifically why DVA and FBA are similar? Note my mathematical ability is only to bachelor degree level, so go easy on me.
I think that your worries regarding normality, in general the right choice of a distribution, and the headache regarding high-dimensional distributions are valid. However, how could you maximise the expected value of your total log-returns without modelling these individual log-returns? By using a couple of serie...
### Problem I want to apply the Kelly criterion to asset returns, so that I know how much to hold of each, ideally (and how much I should keep as a cash reserve). As far as I understand the Kelly criterion, it's about maximizing the expected logarithmic returns - which computes as $$\frac{1}{n}\sum_{t=1}^{n} log(...
I completed a challenge which asks the user to predict tomorrow's market return. The data available is prices data and the model must be logistic regression. They call it "machine learning" but it's pure regression. I derived a number of features from the data (e.g. momentum) etc. The challenge implies that I need t...
From my understanding in a BSM world you can make a bet on volatility using options and delta hedging with the underlying. If you think realized volatility of the underlying will be higher than the volatility implied by the option price you can buy the option, delta hedge with the underlying continuously and your ...
I have been creating a class for determining put/call values based on the Black Scholes Merton model and have run into a weird problem. For some reason my put values end up being less than the intrinsic value of the option which simply doesn't make sense to me. I've scoured my code, rewritten it, and tried using some...
Why is my put intrinsic value greater than my actual put value in BSM? Python code
I got interested in the Kelly Criterion (KC) as a method of optimizing position sizes for intraday trading, and consider one of my primary references as to what it is, how it works, and how to apply it to be "The Kelly Criterion in Blackjack, Sports Betting, and the Stock Market" by Edward Thorp, where he derives the b...
I got interested in the Kelly Criterion (KC) as a method of optimizing position sizes for intraday trading, and consider one of my primary references as to what it is, how it works, and how to apply it to be "The Kelly Criterion in Blackjack, Sports Betting, and the Stock Market" by Edward Thorp, where he derives the b...
I got interested in the Kelly Criterion (KC) as a method of optimizing position sizes for intraday trading, and consider one of my primary references as to what it is, how it works, and how to apply it to be "The Kelly Criterion in Blackjack, Sports Betting, and the Stock Market" by Edward Thorp, where he derives the b...
I got interested in the Kelly Criterion (KC) as a method of optimizing position sizes for intraday trading, and consider one of my primary references as to what it is, how it works, and how to apply it to be "The Kelly Criterion in Blackjack, Sports Betting, and the Stock Market" by Edward Thorp, where he derives the b...
I got interested in the Kelly Criterion (KC) as a method of optimizing position sizes for intraday trading, and consider one of my primary references as to what it is, how it works, and how to apply it to be "The Kelly Criterion in Blackjack, Sports Betting, and the Stock Market" by Edward Thorp, where he derives the b...
I have been creating a class for determining put/call values based on the Black Scholes Merton model and have run into a weird problem. For some reason my put values end up being less than the intrinsic value of the option which simply doesn't make sense to me. I've scoured my code, rewritten it, and tried using some...
Is there any consensus on what is the price behavior in presence of informed trading? Can we observe in retrospect any anomaly in the time series of prices of realized transactions, or transformations thereof? What about considering volumes?
Can we spot informed trading from market prices?
I am a former electronics engineer and I'm fairly new to financial time series analysis. I'm currently working on a thesis on copper determinants and what factors influence its price from an economic perspective. I'd like quantify its volatility over time in order to show the complexity of this mineral commodity price ...
Quantifying volatility: a step by step approach?
I am a former electronics engineer and I'm fairly new to financial time series analysis. I'm currently working on a thesis on copper determinants and what factors influence its price from an economic perspective. I'd like quantify its volatility over time in order to show the complexity of its price forecasting. [Al...
I am a former electronics engineer and I'm fairly new to financial time series analysis. I'm currently working on a thesis on copper determinants and what factors influence its price from an economic perspective. I'd like quantify its volatility over time in order to show the complexity of its price forecasting. [Al...
Should I take in count future which are used to lower the duration to calculate the portfolio's YTM ? (Bloomberg calculate portfolio's YTM without Future) Im currently doing the weighted average. I also take in count future. ![1] If the calculation change with future, what would be the correct formula ? ...
I want to perform an ML analysis on NASDAQ, based on historical fundamentals. Suppose I want to take a temporal window of 10 year and quarterly data. I have a question: I suppose I should know the composition of Nasdaq in the previous years. I mean, its symbols in 2012,2013 and so on. There is a service, AP...
Option pricing Greeks in Python - incorrect Gamma with MC option pricing (Black) using AAD autograd / JAX libraries - but works with closed form?