Display the correlation coefficient and/or Beta of an asset to a specified market.
- Specify market (S&P500 futures by default)
- Display one or other metrics
- Modify assessment period (200 bars by default)
- Calculate on price, returns or log-returns
This is my "Pine-based" correlation() function written in raw Pine Script. Other names applied to it are "Pearson Correlation", "Pearson's r", and one I can never remember being "Pearson Product-Moment Correlation Coefficient(PPMCC)". There is two basic ways to utilize this script. One is checking correlation with another asset such as the S&P 500 (provided as a...
This script allows you to compare the percentage-based change in the price of any two securities on any given (and supported) timeframe on the chart. This can give you a very simple way to compare any two securities against one another.
Ex: If your base security gained 5%, and the other security gained 3% in a single day, the change comparison would show a green...
This script implements a rebrushed distance-based pair trading strategy. In this strategy, normally they trade the difference between the prices of two instruments. This difference is also called spread. Here, however we’ll trade the difference between two time frames of one instrument. And that's the main trick. Common procedure consists of the following...
Logistic Correlation is a correlation oscillator using a logistic function.
A Logistic Function is a Sigmoid Function who stabilize the variance of data.The logistic function have the same function as the inverse fisher transform but with an advantage over it, the k constant can control the steepness of the curve, lowers k's will preserve the original form of the...
Script plots correlation of chart symbol to a variety of indexes, symbols, equities. ** Original idea was to find Bitcoin correlation, which I did not. Built in correlations are: Nikie, DAX, SPY, AAPL, US Dollar, Gold, EURUSD, USDCNY, EEM, QQQ, XLK, XLF, USDJPY, EURGBP
A co-pinescripter friend told me this was impossible to do and we bet a free dinner tomorrow. Guess who's going to be invited to a very fancy restaurant tomorrow :) :) :) (hint: not him)
What's the today script is about?
This script is based on this MT4 correlation matrix
Asset correlation is a measure of how investments move in relation to one...
Core Code from: www.tradingview.com
This indicator Show Correlation between the Current Ticker & timeframe and a Customizable Ticker. After adding the indicator you can change the second ticker in the settings.
The Correlation Coeff is between -1 to 1 which 1 means 100% correlation and -1 means -100% correlation...
The correlation oscillator is a technical indicator that measure the linear relationship between the market closing price and a simple increasing line, the indicator is in a (-1,1) range and rise when price is up-trending and fall when price is down-trending. Another characteristic of the indicator is its inherent smoothing which provide a noise free...
Hello, this script was created by using Linear Regression Bands Function with variable Function Minkowski Distance Adaptive Period.
Function Linear Regression Bands :
Minkowski Distance Function Original Script by RicardoSantos...
Pinescript requires many of its built-in functions to use a simple int as their period length, which entails the period length cannot vary during the script's execution. These functions allow using a series int or series float for their period length, which means it can vary on each bar.
The functions shared in this script include:
Rolling sum: Sum(src,p)
Conceptual indicator based on trying to find an inverse correlation between bitcoin and traditional markets due to bitcoin's usefulness as a hedge against economic downturns.
How to use this script: you look at it and see if there is a correlation or not between bitcoin/Ethereum price and either U.S. stock CVi, buy volume, sell volume, calls, puts, or the call/put ratio.
There are different and better way's to see price data, a candlestick chart is one of the best way to see the price since you have access to the open/high/low/close information, this is really efficient and can allow for naked non parametric trading strategies (candlesticks patterns). But what about making candles out of indicators ? There are tons...
This study is an experiment in adaptive filtering. The process in this study was inspired by KAMA and ZLEMA filtering techniques.
First, data is given an optional modification for lag reduction.
Then, an adaptive filter of your choice is calculated. There are 6 different adaptive filters to choose from in this study:
-Commodity Channel Index Adaptive Moving...