I am running a master degree programme and very new to programming including 
python. I have been given a project to write a python program on exponential 
smoothing of some selected stocks. The program should user the user to input 
alpha, display the graph of the original data and "smoothed data".

On the same python program, I am to develop a linear regression model to 
predict the next period, showing correlation coefficients to indicate the 
strength of the model.

I have been able to write a program which returns some values but no graph and 
also having difficulties with the linear regression.

This is the program I wrote:

def exponential_smoothing (a,y,f):
    ans = (a*y) + (1-a) * f
    return ans

print ("Exponential_Smoothing Program")
a = float(input("please enter a: "))
y = float(input("please enter y: "))
f = float(input("please enter f: "))
ans = exponential_smoothing (a,y,f)
print ("the answers are %.2f" %(ans)) 

Could someone kindly help with tips on how to go about this?

Thanks.



Ode A. IDOKO

... writer, author and consultant


idokol...@yahoo.com
+2347064334855
Author of:
"Putting Your Talent to Work"
Click link below to view book.

http://www.authorhouse.co.uk/Bookstore/BookDetail.aspx?BookId=SKU-000425821

 ...let God alone be true and all men liars!
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to