Untitled

mail@pastecode.io avatar
unknown
plain_text
7 months ago
653 B
4
Indexable
Never
# Calculate average profit
average_profit0 = np.mean(profit_subsampling0)

# Calculate 95% confidence interval
lower_bound0 = profit_subsampling0.quantile(2.5)
upper_bound0 = profit_subsampling0.quantile(97.5)

# Calculate the risk of losses (probability of negative profit)
losses_probability0 = np.mean(profit_subsampling0 < 0)
# Express as a percentage
losses_percentage0 = losses_probability * 100

# Display the results
print("Average Profit:", average_profit0)
print("95% Confidence Interval - Lower Bound:", lower_bound0)
print("95% Confidence Interval - Upper Bound:", upper_bound0)
print("Risk of Losses (as a percentage):", losses_percentage0)
Leave a Comment