Last active
August 23, 2020 16:22
-
-
Save Nick3523/933a72b57326b82c8f8370fb2ee63b1a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# coding: utf-8 | |
import math as m | |
import pandas as pd | |
import cufflinks as cf | |
import plotly.offline | |
cf.go_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 : https://www.wikiwand.com/fr/Rente_d%27Hotelling#/D%C3%A9monstration_en_temps_continu | |
# https://www.investopedia.com/terms/h/hotellings-theory.asp |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment