Formula for defining a curve

938 Views Asked by At

I am attempting to come up with a formula to describe something like the following:

Intended curve

I need the curve to start from 90% on the left side and it needs to hit 0% at the five year mark on the right. I'd like to be able to control how curved it is versus a straight line between the two points. What would be the best formula for something like this?

For the curious, this is intended to represent a tax proposal based on the length of time a stock is owned before it is sold, such that short term trades are highly penalized. I want to be able to tweak the curve for a couple different scenarios.

Thanks!

4

There are 4 best solutions below

0
On

Here is a very simple solution:

$$f(x)=-\frac{90}{5^{2n+1}}(x-5)^{2n+1}$$

$n$ is the parameter of the curve. Below are the graphs for $\color{blue}{n=3}$ and $\color {red}{n=20}$:

enter image description here

1
On

Try $y=90 \left(1-\sqrt[n]{1-\left(1-\frac{x}{5}\right)^n}\right)$ for varying $n$ (which does not need to be an integer).

The curve is one quarter of a superellipse centered at $(5,90)$. It is tangent to the axes at the given points.

0
On

A nearly-correct solution would be to use an exponential decay $N = N_{0}e^{-t/\tau}$. To get this to hit zero at $t=5$, you can apply a correction by subtracting the value at $t=5$, $N_{0}e^{-5/\tau}$. A further correction to $N_{0}$ is then required to bring the start point back towards the required point.

These corrections are not quite perfect (the start point $N_{0}$ never quite returns to exactly where you want it)but lead to a curve that is ok for a show-curve.

For a curve from 90 at 0 to 0 at 5:

$$ 90(1+e^{-5/\tau})(e^{-x/\tau}-e^{-5/\tau}) $$

0
On

One possible curve:

$$y=\frac1{a(x+\sqrt{\frac{50}{9a}+\frac{25}4}-\frac52)}-\frac1{a(\sqrt{\frac{50}{9a}+\frac{25}4}+\frac52)},a>0$$

Methodology:

As equation $y=\frac1{ax},a>0$ has similar shape with the required curve, we may adopt it as an approximation measure. In the equation, larger the $a$, greater the "curvature". In order to make the $y=\frac1{ax}$ curve touching x-axis and y-axis, we shift the curve downward and leftward, and so we modify the equation into :

$$y+c=\frac1{a(x+d)}\text{ ,where }c,d>0$$

Sub x-intercept$=5$, y-intercept$=0.9$

$$0.9+c=\frac1{ad}$$ $$c=\frac1{a(d+5)}$$

Solving,

$$c=\frac1{a(\sqrt{\frac{50}{9a}+\frac{25}4}+\frac52)}$$$$d=a(\sqrt{\frac{50}{9a}+\frac{25}4}-\frac52)$$