A stochastic system is a system which state depends or some random elements making its behavior non-deterministic. Questions with this tag should cover topics regarding random variables and non-determenistic systems.
Questions tagged [stochastic]
256 questions
0
votes
1 answer
stocktsats Stoch RSI values dont match with trading view values
def good_buying_condition_stoch_ema_ema(the_exchange, symbol, timeframe):
#print ("finding the good to go long/buy signal")
r = dict();
hist_data = get_historical_data(the_exchange, symbol, timeframe)
stock_data =…

Torrey Jones
- 1
- 1
0
votes
1 answer
Pine Script Multi Time Frame - My strategy is repainting and I can't figure out why
I thought I understood how to avoid repainting, but I'm still seeing trades on my chart not lining up with alerts, or vice versa.
My script takes data from the 60m chart to trade on the 15m chart. I'm accessing historical data on the 60m (at least 4…

Ian
- 85
- 5
0
votes
1 answer
Cplex optimization--"No Value" for my decision variable
I am new to Cplex optimization.
I am trying to implement an optimization problem with some scenarios. it is a two-stage stochastic model with 5 scenarios and the probabilty of occurrence the scenarios.
I wrote my model with 5 scenarios, parameters,…

Sonia
- 1
- 1
0
votes
2 answers
Trying to Implement Linear Regression with Stochastic Gradient Descent
[Dataset]1I'm attempting to implement linear regression for stochastic gradient descent using python. I have the code to enable me do this but for some reason, its triggering an error at "row[column] = float(row[column].strip())"-could not convert…

DaVince294
- 39
- 7
0
votes
0 answers
R Determine similarity of multiple time series of stochastic events
I am using R to perform my analyses.
I have five datasets: 365 rainfall measurements in a year; 4 x 365 height values in runoff drains located close to each other in the same year.
The graph plots of the drain data exhibit very similar patterns. The…

Peter Wade
- 11
- 3
0
votes
1 answer
Crossover and crossunder functions don't respect the parameters I'm giving pine script
I'm trying to add a simple background color when on a stochastic, k crosses over d any time but when k is above 80, and equally k crosses under d any time but when k is below 20.
Yet constantly I'm getting crossover and crossunder signals in these…

Daniel
- 41
- 2
- 11
0
votes
1 answer
"One after the other" realisation of discrete random variables
I'm stuck with the following problem:
There are given n+1 discrete random variables:
X = {1,...,n} with P(x=i) = p_i
Y_i = {1,...,n_i} with P(y_i = j) = p_ij and i = 1,...,n
We do the following:
We draw from X and the result determines which Y_i…

OldLink
- 3
- 1
0
votes
1 answer
Store unknown values from a function inside a vector for later use in an optimization
I have a loss function of the form 1/N * sum(w_i(market_price-model_price)^2) I want to minimize given four unknown parameters (lambda, vbar, eta, rho). For that I first need to generate model prices with the function HestonCallClosedForm (written…

rubwoer
- 15
- 3
0
votes
2 answers
Stochastic %D values above 80 and below 20
Here is a simple script I wrote to indicate a simple reversal pattern. I want to add to each line so when the stochastic %D is higher than 80 will trigger a red down arrow and when %D is below 20 trigger a green up arrow.
study("Ringed HL",…

Zendango
- 3
- 2
0
votes
1 answer
Why does Julia (DifferentialEquations.jl) JumpProblem stop jumping at later times?
I am trying to implement a discrete stochastic simulation using tools from DifferentialEquations.jl. It works great for earlier time-points but does not do any jumps later on, inexplicably.
using DifferentialEquations
using Plots
#initial…

Alex Crocker
- 35
- 5
0
votes
1 answer
Running Pyomo stochastic example in Spyder
I am aware that Pyomo examples can be run by a command in the Anaconda prompt.
However, I would like to run the stochastic farmer example by using Spyder. I am able to run the deterministic example problem, but not the two-stage (stochastic)…

Sam
- 1
0
votes
1 answer
Using CPnest to calculate Bayes Theorem evidence, receiving AttributeError: 'MetropolisHastingsSampler' object has no attribute 'thread_id'
I am currently trying to use CPnest to calculate some evidences for given a data set (Bayesian statistics)
Upon my first running of the code, I received the error
RuntimeError:
Attempt to start a new process before the current process
…

Rikesh Patel
- 5
- 2
0
votes
0 answers
Np Value Error: setting an array element with a sequence
I am tried to solve a stochastic differential equation. After running my code for the 10th times I got this error, which I cannot address. Some help would be nice:
ux = np.zeros(N+1)
uy = np.zeros(N+1)
t = np.zeros(N+1)
def f(u1, u2, t, alpha):
…

namedunframed
- 31
- 6
0
votes
2 answers
Strategy Tester: Stochastic long and short signals are impacting each other
I am trying to build a simple strategy for a stochastic entry/exit.
I've pretty much copy-pasted the stochastic formula from the inbuilt indicator.
The problem I'm having is that the long and short boolean signals seem to be having some…

Sriram V
- 1
- 1
0
votes
2 answers
Simple Gaussian Process Simulation on R
How to simulate a Gaussian process X(t), t = 1, . . . , 200, with mean value function m(t) = 0 and
covariance function r(h) = Cov(t, t + h) = exp(-|h|). I Know that this process is sometimes referred to as
the Ornstein-Uhlenbeck process but how to…

Ticktock
- 3
- 3