visualise_3d_scatter#
API documentation for tradeexecutor.analysis.grid_search.visualise_3d_scatter Python function.
- visualise_3d_scatter(flattened_result, parameter_x, parameter_y, parameter_z, measured_metric, color_continuous_scale='Bluered_r', height=600)[source]#
Draw a 3D scatter plot for grid search results.
Create an interactive 3d chart to explore three different parameters and one performance measurement of the grid search results.
Example:
from tradeexecutor.analysis.grid_search import analyse_grid_search_result table = analyse_grid_search_result(grid_search_results) flattened_results = table.reset_index() flattened_results["Annualised return %"] = flattened_results["Annualised return"] * 100 fig = visualise_3d_scatter( flattened_results, parameter_x="rsi_days", parameter_y="rsi_high", parameter_z="rsi_low", measured_metric="Annualised return %" ) fig.show()
- Parameters:
flattened_result (DataFrame) –
Grid search results as a DataFrame.
Created by
analyse_grid_search_result()
.parameter_x (str) – X axis
parameter_y (str) – Y axis
parameter_z (str) – Z axis
parameter_colour –
Output we compare.
E.g. Annualised return
color_continuous_scale –
The name of Plotly gradient used for the colour scale.
measured_metric (str) –
- Returns:
Plotly figure to display
- Return type:
Figure