KioseffTrading

Monte Carlo Simulation - Your Strategy [Kioseff Trading]

KioseffTrading Wizard Cập nhật   
Hello!

This script “Monte Carlo Simulation - Your Strategy” uses Monte Carlo simulations for your inputted strategy returns or the asset on your chart!

Features

  • Monte Carlo Simulation: Performs Monte Carlo simulation to generate multiple future paths.
  • Asset Price or Strategy: Can simulate either future asset prices based on historical log returns or a specific trading strategy's future performance.
  • User-Defined Input: Allows you to input your own historical returns for simulation.
  • Statistical Methods: Offers two simulation methods—Gaussian (Normal) distribution and Bootstrapping.
  • Graphical Display: Provides options for graphical representation, including line plots and histograms.
  • Cumulative Probability Target: Enables setting a user-defined cumulative probability target to quantify simulation results.
  • Adjustable Parameters: Offers numerous user-adjustable settings like number of simulations, forecast length, and more.
  • Historical Data Points: Option to specify the amount of historical data to be used in the simulation (price).
  • Custom Binning: Allows you to select the binning method for histograms, with options like Sturges, Rice, and Square Root.
  • Best/Worst Case: Allows you to show only the best case / worst case outcome (range) for all simulations!
  • Scatterplot: allows you to show up to 1000 potential outcomes for a specified trade number (or bars forward price endpoint) using a scatter plot.


The image above shows the primary components of the indicator!


The image above shows the best/worst case outcome feature in action!


The image above shows a "fun feature" where 1000 simulated end points for a 15-bar price trajectory are shown as a scatter plot!

How To Perform a Monte Carlo Simulation On Your Strategy

Really, you can input any data into the indicator it will perform a Monte Carlo Simulation on it :D

The following instructions show how to export your strategy results from TradingView to an Excel File, copy the data, and input it into the indicator.

However, you are not limited to following this method!

Wherever your strategy results are stored, simply copy and paste them into the indicator text area in the settings and simulations will begin.

Returns Should Follow This Format

1
3
-3
2
-5

The numbers are presented as a single column. No commas or separators used.

The numbers above are in sequential order. A return of "1" for the first trade and a return of "-5" for the last trade. Your strategy returns will likely be in sequential order already so don't worry too much about this (:

How To Perform a Monte Carlo Simulation On Your TradingView Strategy With Excel Data

  • Export your strategy returns to an excel file using TradingView
  • Navigate to your downloads folder to column G "Profit"
  • Click the column and press CTRL + SPACE to highlight the entire column
  • Press CTRL + C to copy the entire column
  • Open this indicator's settings and paste the returns into the text area


The image above illustrates the process!

Notes on Inputting Returns

*Must input your returns without a separate as a vertical list
*The initial text area can only hold so many return values. If your list of trades is large you can input additional returns into two additional text areas at the bottom of the indicator settings.

That should be it; thank you for checking this out!

Phát hành các Ghi chú:
Added an extra returns text area for strategies with a large number of trades.

Of course shoutout to @RicardoSantos for all the materials he shared!! (:
Phát hành các Ghi chú:
Added an option to set seed; values will remain stagnant now!

Thank you (:

•Access to Next-Gen Optimization Tools: www.kiosefftrading.com

•Discord Server: discord.gg/3cKVU28Z9Z
Mã nguồn mở

Với tinh thần TradingView, tác giả của tập lệnh này đã xuất bản nó dưới dạng mã nguồn mở, vì vậy các nhà giao dịch có thể hiểu và xác minh nó. Chúc mừng tác giả! Bạn có thể sử dụng mã này miễn phí, nhưng việc sử dụng lại mã này trong một ấn phẩm chịu sự điều chỉnh của Nội quy nội bộ. Bạn có thể yêu thích nó để sử dụng nó trên biểu đồ.

Thông báo miễn trừ trách nhiệm

Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.

Bạn muốn sử dụng tập lệnh này trên biểu đồ?