This paper addresses the joint calibration problem of SPX options and VIX options or futures. We show that the problem can be formulated as a semimartingale optimal transport problem under a finite number of discrete constraints, in the spirit of [12]. We introduce a PDE formulation along with its dual counterpart. The optimal processes can then be represented via the solutions of Hamilton-Jacobi-Bellman equations arising from the dual formulation. A numerical example shows that the model can be accurately calibrated to the SPX European options and the VIX futures simultaneously.Recently, the theory of optimal transport has proved to be successful for robust hedging and volatility calibration. The discrete-time martingale optimal transport has been applied to derive model-independent bounds of VIX derivatives by De Marco and Henry-Labordere [5]. The theory has been further used to the calibrate the non-parametric discrete-time model proposed by Guyon [15]. In terms of continuous-time optimal transport, the authors of this paper have applied the theory to the calibration of local volatility [13] and local-stochastic volatility models [12] to European options. Furthermore, in [10], the first two authors have extended the semimartingale optimal transport problem [22] to a more general path-dependent setting. Their work expands the available calibration instruments from European options to path-dependent options, such as Asian options, barrier options and lookback options.In this paper, we introduce a time continuous formulation of the joint calibration problem. Identifying suitable state variables, we formulate the joint calibration problem as a semimartingale optimal transport problem under a finite number of discrete constraints, as studied in [12]. Instead of directly modelling the volatility or VIX process, we consider a semimartingale X whose first element X 1 is the logarithm of the SPX price and second element is defined as X 2 t := E(X 1 T | F t ). The filtration F t represents the market information available at time t. Then, the payoff of VIX futures can be expressed in the form of E( X 1 t − X 2 t ). By applying the localisation result of [12], we show that the solutions can be found among a set of Markov processes that the drift and diffusion are functions of t and X t . We then introduce a PDE formulation along with its dual counterpart. Furthermore, we show that the solutions can be represented in terms of solutions of Hamilton-Jacobi-Bellman (HJB) equations arising from the dual formulation.There are two motivations for identifying the conditional expectation as a state variable. Firstly, it makes the joint calibration problem fall into the class of the problems studied in [12]. Secondly, taking X 2 as a state variable, we can use conventional Monte Carlo methods or PDE methods to calculate the prices of VIX derivatives. If we only have X 1 , due to the nonlinearity of the square root function, the evaluation of the conditional expectation cannot be computed by direct Monte Carlo methods. It often req...