Skip to content

Instantly share code, notes, and snippets.

Last active August 23, 2020 16:22
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save Nick3523/933a72b57326b82c8f8370fb2ee63b1a to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
# coding: utf-8
import math as m
import pandas as pd
import cufflinks as cf
import plotly.offline
cf.set_config_file(offline=False, world_readable=True)
P0 = 2000
r = 0.005 #taux d'intêrets, supposé constant
MC = 500 #cout marginale, supposé constant
def getPrice(P0, MC, r, T):
return [((P0-MC) * m.exp(r * t)) for t in range(T)] #exp car en temps continue
df = pd.DataFrame(getPrice(P0, MC, r, 1000), columns = ['Prix'])
df.iplot(title="Evolution du prix selon la rente d'Hotelling", xTitle='Périodes', yTitle='Prix', color='black')
#Sources :
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment