Azzera filtri
Azzera filtri

compute the probability for three events

6 visualizzazioni (ultimi 30 giorni)
Francesco Pio
Francesco Pio il 13 Giu 2023
Risposto: Image Analyst il 13 Giu 2023
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?

Risposte (1)

Image Analyst
Image Analyst il 13 Giu 2023
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.

Categorie

Scopri di più su Stochastic Differential Equation (SDE) Models in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by