Let’s assume now the more general case where a, b and c depend on z. I would need to define z as an endogenous variable, but what equation should be associated with it?

In other words, how can I access the volatility of an endogenous forward-looking variable?

z is precisely the volatility of the endogenous forward-looking variable y, as is made clear by the equation for the dynamic of y:

dy = c(x, y) * dt + z * dW

Ultimately, a FBSDE consists of two equations

dx = a(x, y, z) * dt + b(x, y, z) * dW
dy = c(x, y, z) * dt + z * dW

for three unknown variables x, y and z.

As is well explained for example by Carmona & Delarue in their textbook on Mean Field Games:

“For the reader who is not familiar with the theory of forward-backward equations, it may sound rather strange to ask for the well posedness of a system with three unknowns but two equations only. Actually, the reader must remember the fact that the triple (X; Y; Z) is required to be progressively measurable with respect to F. In particular, it should not anticipate the future of W. The role of the process Z is precisely to guarantee the adaptedness of the solution with respect to the filtration F. In the end, the forward-backward system actually consists of two equations and a progressive measurability constraint.”

Dynare, for its part, requires the same number of equations and variables.

Sorry, I am not an expert in this field. But as far as I understand, your are discretizing a differential equation to work with difference equations. But in that case, something needs to take the place of the

Still considering my model with a predetermined variable x and a forward looking variable y, I am looking to access the volatility of y (named z) in the model block.

The missing equation would be something like

z = volatilityOf(y);

if only such a function existed.

But maybe we can make use of the policy function F (also known as decision rule) according to which the forward looking variable y can be express as a function of the predetermined one x:

what exactly do you mean? It’s not the unconditional variance of y as far as I can see.

Regarding your question, there may be no closed form way of doing this. But you may be able to solve this iteratively. Start with a guess for the policy function and its derivative. Compute the actual policy function based on that solution. Update the guess and keep iterating until you reach the fixed point.