compute the probability for three events

2 次查看(过去 30 天)
I have a cryptocurrency that has a certain price associated with it.
There are three possible events:
1) Nothing happens.
2) The token is sold.
3) The token is bought.
At a certain instant of time, each of these three events has a probability of occurring and this probability depends on the price of the token.
I would like to create such a function that takes the token price as input and generates three probabilities, one for each of the three events.
function [prob1, prob2, prob3] = calculate_Probability(price)
prob1 = ...... ;
prob2 = ...... ;
prob3 = ...... ;
end
prob1 + prob2 + prob3 = 1 and prob1, prob2, prob3 > 0 for each price value.
The probability of event 1 occurring is highest when the price is $1 and decreases when the price deviates from this value. The chart is a sort of bell centered at the price of 1.
The probability that event 2 occurs increases as the price increases, forming an exponential graph.
The probability that event 3 occurs increases as the price decreases, forming a graph with an exponential shape in reverse.
What matlab tools can I use to model this situation? How can I ensure that for a given price value the sum of the three probability functions is always 1?

回答(1 个)

Image Analyst
Image Analyst 2023-6-13
I suggest you run a Monte Carlo experiment. Just use rand, and run the experiment around a million times and look at what you got. Of course you'd have to program in your exponential and inverse exponential curves. If you need help with a Monte Carlo, I'm attaching a few demos, though not for your exact situation.

类别

Help CenterFile Exchange 中查找有关 Modeling 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by