[Tkinter] User interface for stock portfolio optimisation - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: GUI (https://python-forum.io/forum-10.html) +--- Thread: [Tkinter] User interface for stock portfolio optimisation (/thread-25552.html) |
User interface for stock portfolio optimisation - Fourchelangue - Apr-02-2020 Hi, I am a noob on Python and more generally in programming, but I am doing my best to learn thanks to online tutorials. I would like to code a small downloadable program allowing anyone to obtain the optimal stock weights to include in a portfolio in order to maximise expected return. Based on a code I found online and some personal adjustments, the code is operational and gives me the outcomes (text and graphs) that I want already. However, I would like to make the code "responsive" to inputs entered in a user interface. For this, I know I have to use Tkinter. I have made several attemps, but I cannot succeed to connect my python code and the user interface thanks to Tkinter. I just miss that "link" to make everything go smoothly. Could you please help me? I would like to add a picture of the final result I am looking for but I don't know how. So here is a quick description. I would like to have a downloadable program with an icon, which opens a window when we click on it. Just like any program. Once the window opens it would be organised as follow: Top section: Logo + Welcome + Instructions Next to it, two buttons one "Export the document as PDF" and another "Clear inputs" Inputs section: 3 labels with 3 entry boxes Label 1: How many stocks are there in your portfolio? Entry box 1: horizontal slider widget ranging from 3 to 30 Label 2: Enter the related stock tickers (yahoo finance) Entry box 2: text box - important to type stocks as follow 'AAPL', 'GOOGL', 'FB' ...... Label 3: Precise time interval for historic performance and volatility Entry box 3: radio button - 1 year or 3 years or 5 years from today (last closing price when the user opens the program) Outputs section: 2 graphs and 2 texts Graph 1 |