Consider a single-name total return swap (TRS) on some reference asset $S$. For concreteness, suppose the length of the contract is one year with quarterly resets, and the performance of $S$ is exchanged for LIBOR.
Then the TRS value resets at $0$ at each reset date, so for some $t$ in some period that ends at time $T$, the value of the agreement assuming there is no cancellation feature is simply $$V_{t}=\mp(S_{t}-P_{t}^{T})\pm P_{t}^{T}S_{0}L_{0}^{T}T$$ where $P_{t}^{T}$ is the discount factor observed at time $t$ for the period $[t,T]$ and $L_{0}^{T}$ is the period LIBOR (simple) rate set at time $0$ (beginning of the period) for the period $[0,T]$.
However, if at any time in the performance period of the contract either party can terminate the agreement (not settle at the market value $V_{t}$), I have seen it claimed that an accrual valuation method is appropriate and that the contract can be valued for any $t$ as $$V_{t}=\mp(S_{t}-S_{0})\pm S_{0}L_{0}^{T}(T-t).$$
I don't understand the justification for this formula. Since the bi-cancellable feature can be modeled as a long (short) call and short (long) put position (depending on the side of the contract you are on), some sort of put-call parity should be applicable, which leads to the accrual formula above, but I could not get this to quite work out (perhaps someone with more practice with these types of derivations would more easily be able to do it).
Another argument is that the hedging strategy employed by a desk selling this TRS would be to overnight repo $S$, and thus the cumulative borrowing cost upto time $t$ is in some sense $S_{0}L_{0}^{T}(T-t)$, and so if the counterparty wanted to cancel, the desk could just not roll over the repo and sell the asset to cover the position and repo loan. But besides the assumption of constant interest rates, if the term of the contract is set to $T$ at the beginning of the performance period, then ostensibly the desk takes out a $T$-period loan of $S_{0}$, charges the client the interest on this loan, and then liquidates the position at time $T$ to cover the loan and the performance gain or loss on $S$ (i.e., $S_{T}-S_{0}$). This hedging argument is how the first valuation formula is obtained (although it can also be obtained in a straight forward manner using risk-neutral pricing methods).