Behind the mathematics of compound interest are a series of layers of thought experiment, fiction upon fiction, compounded. Interest itself as an idea has its modern origin in the act of lending or borrowing money. In general, it measures the growth (or diminution) of a quantity across an observation period.

The starting point for the fiction is that you can predict the future. You can't of course. But laying out your expectations about the future is a kind of fictional account of what you hope will happen.

Remember also that all interest is compounded, with per year compounding periods of $n=\infty, \frac{1}{365}, \frac{1}{12}, \frac{1}{4}, \frac{1}{2}, 1,\frac{1}{t}$. So with compounding, you identify a number (1 or more) of regularly occurring, evenly spaced way points along the journey from observation start point (investment initiation, loan beginning) to observation end point (maturity, investment exit). No cash flow needs to accompany these marker points. Though cash flows often do. They can be merely notional. But at these way points, ownership is transferred from one party to another of some fractional value - cash or something else valuable.

Then, within the boundary of these fictional way points, come even more fine grained way points, where some linear fraction of the sum to be earned in the current way point period is measured out. This fine grained linear fraction often measures so-called accrued interest. Again it is often expressed as simple interest on the coupon you're in the process of compounding, but in reality it is often $n=\frac{1}{t}$ compounding within a semi-annual bond coupon compounding $n=2$. It is done so that when a bond is traded on any day which doesn't fall on a compounding period end date (i.e. on most days), the buyer and seller break up the intermediate value of the current coupon betwen buyer and seller - a bit like Pascal's problem of points, where a game is ended at a point where the rules haven't fleshed out the value. The presumption of fairness drives a buyer or seller of the bond to agree to apply time-weighted $\frac{1}{t}$ compounding to get a micro read on how most fairly to split up the current coupon.

When you express $\frac{1}{t}$ compounding for a period, what you're doing is implicitly saying that no further micro structure is worth considering between the two dates - in this case the dates which bound the current coupon. That being so, then you can use a linear fraction of days (or years, seconds, whatever, as it is a ratio after all) to work out the fair division of the currently in play coupon. That is, compounding only at the end allows you to treat the rate as a linearly scalable ratio.

The human scale on interest payment doesn't go further than these two levels, namely coupon compounding and accrued interest. The sums involved in any one deal are usually of a scale that further kinds of compounding don't seem worth it in analysis.

But the mathematics doesn't care about that mere human constraint. You could keep on carrying on this micro analysis to the sub-day level, in theory to the continuously compounded level. This might become more relevant in centuries to come when the world of high frequency trading comes to the world of sovereign bond relative value trading.

These layers of fiction exist in different places. For example, the bi-annual compounding frequency of many bonds exists as a fact of the bond prospectus. But the accrued interest fiction exists between buyers and sellers of that asset. It is a form of market practice, that is to say, a sub-prospectus descriptor. Said differently, the writer of a bond prospectus could imagine a world where a different daily accrual convention could apply.

Every use of the compounding formula so far in these recent postings concerns discovering something about a trans-temporal analysis of a series of cash flows wrapped up in the conventional legalistic dressing of a bond. It is a single algorithm which explains how the quantity changes at moments within the observation range (internal period ends and internal period middles and starts).