Skip to content

Trigonometric function

Sine, cosine and tangent connect angles with circular geometry. Read radians, amplitude, period, phase and tangent poles through a synthetic seasonal P&L component.

A trigonometric function converts an angle into a quantity determined by circular geometry. The main examples are sine, cosine and tangent. Sine and cosine give the vertical and horizontal coordinates of a point moving around a unit circle; tangent gives their ratio wherever the horizontal coordinate is nonzero.

For a quant, their useful feature is repetition. A sine or cosine can describe a seasonal component, while combinations of frequencies underpin Fourier series. The mathematics supplies a way to represent a cycle. Evidence that a financial series actually contains a stable cycle must come separately.

Start with an angle, not a triangle restriction

Measure an angle θ\theta counterclockwise from the positive horizontal axis. On a circle of radius rr, its radian measure is arc length divided by radius. A full turn is therefore 2π2\pi radians, equivalent to 360∘360^\circ.

On the unit circle, whose radius is one, the point reached is

P=(cos⁡θ,sin⁡θ).P=(\cos\theta,\sin\theta).

This definition works for negative angles and multiple turns as well as for acute angles. For example, at θ=π/6\theta=\pi/6 the point is (3/2,1/2)(\sqrt{3}/2,1/2): cosine is 3/2\sqrt{3}/2 and sine is 1/21/2. Because the point remains on the circle,

cos⁡2θ+sin⁡2θ=1.\cos^2\theta+\sin^2\theta=1.

The squares mean squared outputs, such as (sin⁡θ)2(\sin\theta)^2, rather than doubling the input angle.

At angle pi over six on a unit circle, the horizontal coordinate is square root of three over two and the vertical coordinate is one half. Both coordinates are dimensionless.
At angle pi over six on a unit circle, the horizontal coordinate is square root of three over two and the vertical coordinate is one half. Both coordinates are dimensionless.
The two projections define cosine and sine. The radius fixes their squared sum at one.

Sine and cosine repeat after a full turn:

sin⁡(θ+2π)=sin⁡θ,cos⁡(θ+2π)=cos⁡θ.\sin(\theta+2\pi)=\sin\theta,\qquad \cos(\theta+2\pi)=\cos\theta.

Their shapes differ only by a quarter-turn shift: cos⁡θ=sin⁡(θ+π/2)\cos\theta=\sin(\theta+\pi/2). At angle zero, cosine starts at one while sine starts at zero.

Record the angle convention. Standard Python and R trigonometric functions take radians. For example, 90∘=π/290^\circ=\pi/2 gives sine one, whereas an input of 9090 radians gives approximately 0.8940.894. An output within the expected range does not prove the input units were correct.

A seasonal component with dollar units

Suppose a researcher uses the following synthetic seasonal contribution to a P&L model:
m(t)=2sin⁡(2πt12) USD,m(t)=2\sin\left(\frac{2\pi t}{12}\right)\ \text{USD},

where tt is elapsed time measured in months. The model assigns the repeating component a zero baseline, amplitude USD 2 and period 12 months. The angular frequency is 2π/12=π/62\pi/12=\pi/6 radians per month, so multiplying it by time produces the angle supplied to sine.

Elapsed timeAngleComponent
0 months00USD 0
3 monthsπ/2\pi/2USD 2
6 monthsπ\piUSD 0
9 months3π/23\pi/2USD −2
12 months2π2\piUSD 0

Amplitude measures the largest deviation from the baseline; the USD 4 distance from trough to peak is twice the amplitude. A negative component means a negative contribution to modelled P&L. It is not a claim that a cash asset has a negative price.

More generally, write a nonconstant sinusoid as

g(t)=b+Asin⁡(ωt+ϕ),A≠0,ω≠0.g(t)=b+A\sin(\omega t+\phi),\qquad A\ne0,\quad\omega\ne0.

Here bb is the baseline, ∣A∣|A| is the amplitude, and ϕ\phi is the phase angle in radians. Both bb and AA have the output’s units; ω\omega has units of radians per unit time. Its period is

T=2π∣ω∣.T=\frac{2\pi}{|\omega|}.

For positive ω\omega, the horizontal shift relative to sin⁡(ωt)\sin(\omega t) is −ϕ/ω-\phi/\omega. For example, delaying the original component by three months gives

m(t−3)=2sin⁡(πt6−π2) USD.m(t-3)=2\sin\left(\frac{\pi t}{6}-\frac{\pi}{2}\right)\ \text{USD}.

Its first nonnegative-time peak moves from month 3 to month 6. Its amplitude and period stay unchanged. A phase angle and a time delay have different units; converting between them requires the angular frequency. If A=0A=0 or ω=0\omega=0, the expression is constant and has no smallest positive period, so the stated period formula is not applicable.

Synthetic P&L component with amplitude USD 2 and period 12 months. The solid curve equals USD 2 at months 3 and 15 and USD minus 2 at month 9. The dashed curve has the same amplitude and period, delayed by three months.
Synthetic P&L component with amplitude USD 2 and period 12 months. The solid curve equals USD 2 at months 3 and 15 and USD minus 2 at month 9. The dashed curve has the same amplitude and period, delayed by three months.
Original synthetic curves. The distance between solid-curve peaks measures the period; shifting the dashed curve changes timing.

A real P&L model would also need a baseline, other drivers and a residual. Calendar effects may change, and fitting a wave to past observations does not establish a repeatable trading profit or a reliable forecast. The negative part of this illustration is allowed because the quantity being represented is a contribution to P&L.

Tangent is periodic, but it has gaps

Tangent is defined by

tan⁡θ=sin⁡θcos⁡θ.\tan\theta=\frac{\sin\theta}{\cos\theta}.
Unlike sine and cosine, it is unbounded and excludes every input θ=π/2+kπ\theta=\pi/2+k\pi, where kk is an integer, because cosine is zero there. These excluded points are poles: tangent grows without bound in magnitude nearby. In particular, it tends to positive infinity when approaching π/2\pi/2 from below and negative infinity from above; it has no value at the pole.
Function, for real anglesDomainRangeSmallest positive period
sin⁡θ\sin\thetaAll real inputs[−1,1][-1,1]2π2\pi
cos⁡θ\cos\thetaAll real inputs[−1,1][-1,1]2π2\pi
tan⁡θ\tan\thetaθ≠π/2+kπ\theta\ne\pi/2+k\pi, integer kkAll real outputsπ\pi

A half-turn changes the signs of both sine and cosine, leaving their ratio unchanged. This explains tangent's shorter period. Numerical software can return an enormous finite approximation at a floating-point representation of a pole; that does not make the mathematical function defined there.

The remaining standard functions are the reciprocal ratios sec⁡θ=1/cos⁡θ\sec\theta=1/\cos\theta, csc⁡θ=1/sin⁡θ\csc\theta=1/\sin\theta and cot⁡θ=cos⁡θ/sin⁡θ\cot\theta=\cos\theta/\sin\theta, each only where its denominator is nonzero. They inherit the corresponding excluded inputs.

The connection beyond real cycles

Euler's formula, eiθ=cos⁡θ+isin⁡θe^{i\theta}=\cos\theta+i\sin\theta, combines the unit-circle coordinates into one complex number. This is the bridge from real oscillations to Fourier methods.
Hyperbolic functions are a different family: for real inputs, cosh⁡2x−sinh⁡2x=1\cosh^2x-\sinh^2x=1 has a minus sign, and those functions do not repeat like real sine and cosine. Similar names do not imply the same graphs, identities or domains.
For a fuller introduction, Basic Trigonometry develops radian conversion, special angles, addition identities and periodic models. The public page is a preview; the full lesson requires membership.

Sources

  • Stewart, J. (2008). Single Variable Calculus: Early Transcendentals, 6th edition, §1.2, “Trigonometric Functions,” and §1.3, “New Functions from Old Functions,” transformations subsection. Brooks/Cole.
  • OpenStax, Algebra and Trigonometry 2e, §7.3, Unit Circle.
  • NIST, Digital Library of Mathematical Functions, §4.14, Definitions and Periodicity.
Last updated
  • trigonometry
  • radians
  • unit circle
  • periodicity
  • seasonality
  • phase
← Back to the glossaryBack to top ↑