Some time ago I spent a lot of effort trying to show that the semimartingalesemimartingale property is preserved by certain functions. Specifically, that a convex function of a semimartingale and decreasing function of time is itself a semimartingale. This was needed for a result which I was trying to prove (more details below) and eventually managed to work around this issue, but it was not easy. For twice continuously differentiable functions this is an immediate consequence of Ito's lemmaIto's lemma, but this cannot be applied in the general case. After failing at this task, I also spent a considerable amount of time trying to construct a counterexample, also with no success. So, my question is as follows.
This problem arose while I was trying to prove the following: is a continuous martingale uniquely determined by its one dimensional marginals? For arbitrary continuous martingales this is false, but is known to be true for diffusions $dX_t=\sigma(t,X_t)\,dW$ for Brownian motion $W$ and smooth parameter $\sigma$. The idea is to back out $\sigma$ from the Kolmogorov forward equationKolmogorov forward equation. This is well-known in finance as the local volatilitylocal volatility model. However, I was trying to show rather more than this. All continuous and strong Markov martingales are uniquely determined by the one dimensional marginals. I was able to prove this, and the relation between the marginals and joint distributions of the martingale has many nice properties (I wrote a paperpaper on this, submitted to the arXiv, but not published as I am still working on changes asked for by the referees). The method was to reformulate the Kolmogorov backward equationKolmogorov backward equation in terms of the marginals. This does use Ito's lemma, requiring twice differentiability, but can be circumvented with a bit of integration by parts as long as $f(t,X_t)$ is a semimartingale for the kinds of functions mentioned above. The question above arose from trying, and failing, to prove this. Without an answer to this question, the problem becomes much much harder, as many of the techniques from stochastic calculus can no longer be applied (and, approximating by semimartingales didn't seem to help either). The work around was very involved, part of which I published as a standalone paper herehere and the rest forms most of a paper I submitted to the arXiv herehere. Adding together those papers, it comes to maybe 50 pages of maths and a lot of effort to work around the question above.
Update: I posted more details on the various equivalent forms of this question herehere. I also posted a possible counterexamplepossible counterexample, without proof but with some numerical evidence suggesting that it may indeed be a counterexample.