Adaptive Power Law Fitting by Dr. G. Santostasi

The BTC Power Law Model creates a linear fit by assuming a power law relationship between the Price and time (measured in days from the Genesis) block and therefore uses the log of the price and the log of time (that is rarely used in financial analysis) to perform the regression calculation. It turns out that this unusual but simple approach represents a surprisingly good long-term approximation of the BTC price (with an R^2=0.95).
While Dr. Santostasi is the creator of the model other Pinescripts exist using the methodology borrowed from his work. Dr. Santostasi inspected the code of these scripts and they are incorrect or they use a static formula for the fitting instead of doing the regression in real time based on current data. This is why this current script is called "adaptive".
It uses current data, cleans the data of large outliers using several statistical methods and creates an online robust fitting in the log-log space. It is also adaptive because instead of being only valid on a daily bar time frame it can be used at all time frames (even if daily is ideal).
The other existent scripts cannot be used in this way because they use a static method designed only for the daily time frame.
Another innovation of the current script is to identify deviation levels from the trend that are based on sound statistical methods. A log-normal distribution of the residuals is assumed (based on the actual distribution of the BTC deviations). These distributions then it is then used to determine possible resistance and support levels at the relevant scale chosen by the user.
The script also contains other relevant information like previous and the next halvings.
Furthermore, the script projects the prediction of the model to the future (again missing from most existing PL scripts) several bars in the future selected as a parameter by the user.
The BTC Power Law Model creates a linear fit by assuming a power law relationship between the Price and time (measured in days from the Genesis) block and therefore uses the log of the price and the log of time (that is rarely used in financial analysis) to perform the regression calculation. It turns out that this unusual but simple approach represents a surprisingly good long-term approximation of the BTC price (with an R^2=0.95).
While Dr. Santostasi is the creator of the model other Pinescripts exist using the methodology borrowed from his work. Dr. Santostasi inspected the code of these scripts and they are incorrect or they use a static formula for the fitting instead of doing the regression in real time based on current data. This is why this current script is called "adaptive".
It uses current data, cleans the data of large outliers using several statistical methods and creates an online robust fitting in the log-log space. It is also adaptive because instead of being only valid on a daily bar time frame it can be used at all time frames (even if daily is ideal).
The other existent scripts cannot be used in this way because they use a static method designed only for the daily time frame.
Another innovation of the current script is to identify deviation levels from the trend that are based on sound statistical methods. A log-normal distribution of the residuals is assumed (based on the actual distribution of the BTC deviations). These distributions then it is then used to determine possible resistance and support levels at the relevant scale chosen by the user.
The script also contains other relevant information like previous and the next halvings.
Furthermore, the script projects the prediction of the model to the future (again missing from most existing PL scripts) several bars in the future selected as a parameter by the user.
Skrip jemputan sahaja
Hanya pengguna yang diberikan kebenaran oleh penulis mempunyai akses kepada skrip ini dan ini selalunya memerlukan pembayaran. Anda boleh menambahkan skrip kepada kegemaran anda tetapi anda hanya boleh menggunakannya selepas meminta kebenaran dan mendapatkannya daripada penulis — ketarhui lebih lanjut di sini. Untuk lebih butiran, ikuti arahan penulis di bawah atau hubungi Quantonomyfund secara terus.
Ambil maklum bahawa skrip peribadi dan jemputan sahaja ini tidak disemak oleh moderator skrip dan kepatuhannya dengan Peraturan Dalaman adalah tidak dapat ditentukan. TradingView tidak menyarankan pembayaran untuk atau menggunakan skrip kecuali anda benar-benar mempercayai penulisnya dan memahami bagaimana ia berfungsi. Anda juga boleh mendapatkan alternatif sumber terbuka lain yang percuma dalam skrip komuniti kami.
Arahan penulis
Amaran: sila baca panduan kami untuk skrip jemputan sahaja sebelum memohon akses.
Penafian
Skrip jemputan sahaja
Hanya pengguna yang diberikan kebenaran oleh penulis mempunyai akses kepada skrip ini dan ini selalunya memerlukan pembayaran. Anda boleh menambahkan skrip kepada kegemaran anda tetapi anda hanya boleh menggunakannya selepas meminta kebenaran dan mendapatkannya daripada penulis — ketarhui lebih lanjut di sini. Untuk lebih butiran, ikuti arahan penulis di bawah atau hubungi Quantonomyfund secara terus.
Ambil maklum bahawa skrip peribadi dan jemputan sahaja ini tidak disemak oleh moderator skrip dan kepatuhannya dengan Peraturan Dalaman adalah tidak dapat ditentukan. TradingView tidak menyarankan pembayaran untuk atau menggunakan skrip kecuali anda benar-benar mempercayai penulisnya dan memahami bagaimana ia berfungsi. Anda juga boleh mendapatkan alternatif sumber terbuka lain yang percuma dalam skrip komuniti kami.
Arahan penulis
Amaran: sila baca panduan kami untuk skrip jemputan sahaja sebelum memohon akses.