Skip to content

Instantly share code, notes, and snippets.

@Nick3523

Nick3523/HottelingCurve.py

Last active Aug 23, 2020
Embed
What would you like to do?
#!/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
You can’t perform that action at this time.