RicardoSantos

FunctionSMCMC

RicardoSantos Wizard Aggiornato   
Library "FunctionSMCMC"
Methods to implement Markov Chain Monte Carlo Simulation (MCMC)

markov_chain(weights, actions, target_path, position, last_value) a basic implementation of the markov chain algorithm
  Parameters:
    weights: float array, weights of the Markov Chain.
    actions: float array, actions of the Markov Chain.
    target_path: float array, target path array.
    position: int, index of the path.
    last_value: float, base value to increment.
  Returns: void, updates target array

mcmc(weights, actions, start_value, n_iterations) uses a monte carlo algorithm to simulate a markov chain at each step.
  Parameters:
    weights: float array, weights of the Markov Chain.
    actions: float array, actions of the Markov Chain.
    start_value: float, base value to start simulation.
    n_iterations: integer, number of iterations to run.
  Returns: float array with path.
Note di rilascio:
v2
outsourced the probability distribution sample selection to a external library:
-
Libreria Pine

Nello spirito di condivisione promosso da TradingView, l'autore (al quale vanno i nostri ringraziamenti) ha deciso di pubblicare questo script in modalità open-source, così che chiunque possa comprenderlo e testarlo. Puoi utilizzare questa libreria in privato o all'interno di altre pubblicazioni open-source, ma il riutilizzo del codice è subordinato al rispetto del Regolamento.

Declinazione di responsabilità

Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.

Vuoi usare questa libreria?

Copia il testo ed incollalo nel tuo script.