FMP
Sep 30, 2022 3:20 AM - Jack Dalton
Image credit: ThisisEngineering RAEng
Financial Modelling Prep provides a free stock API, financial statement API, and lots more valuable financial data. Before you can start taking advantage of our service you must first set up the environment where you are going to write your code. In this guide, we will explain exactly how to do this:
Anaconda is one of the leading python and data science platforms. It enables you to be able to have your own Jupyter Notebook style environment to write your code and run your analysis. The Jupyter Notebook environment is great for beginners to intermediate coders because it allows you to run individual blocks of code and get their specific outputs. Everything in one notebook will be connected so it makes it much easier to debug your code and figure out the exact location of any errors. Anaconda enables you to create your own Juptyer Notebook environment that will store your files locally on your PC or Mac. Here are the instructions from Anaconda on how to install it on your Mac or Windows PC:
Now that you've installed Anaconda, it is time to launch JupyterLab and start making your environment your own. First you will need to open the Anaconda Navigator. Don't be scared by the seemingly scary command centre code it runs when you open it - this is normal and won't harm your computer. Once you've launched Anaconda Navigator you'll be asked to make an account which is not necessary to get started so we recommend you ignore this. You should get to a screen like this:
Click the Launch Button underneath JupyterLab which is highlighted above. This will take you to a new tab on your preferred browser and will look something like this:
Once successfully launched, you'll want to create a new folder and name whatever makes the most sense to you (We called ours FMP because we're biased!). Below you'll see that the new folder button is highlighted:
After you've created the main folder that you'll store all your work, spend some time thinking about how to organize your subfolders. We recommend creating a new folder for each project you take on and putting all your work for that project in that folder. This will likely be multiple Jupyter notebooks and other files such as CSVs. Below is an example of the folder structure we have used:
So now your environment is all set up, it is time to start writing some code and performing analysis using Python. To start, perhaps create a folder called “Learning” or something similar to store all of your notebooks used to get started and learn new skills. To open the folder, simply double click it. To navigate back press the name of the main folder. To open your first notebook click the tile beneath the Notebook header that says “Python 3” and a new notebook will open!
By default, this notebook will be untitled. To rename the notebook either right-click the file in the left-hand side or at the top of the tab and then select rename. These two are highlighted below:
To make sure Jupyter is working properly always run a simple test bit of code and make sure the output works well. For example, try typing the following into the first cell:
x = 7 * 5
x
Then hit enter.
You should of course get an output of 35
If you want to create a new notebook, click the + icon in the top left corner of Jupyter and it will bring up a new launcher where you can follow the steps above to begin a new notebook.
So that's how you can get your Python coding environment set up and start coding. First, download and install Anaconda. Then, launch JupyterLabs and create your folder structure. Finally, launch your first notebook and test it works before beginning your coding adventure!
May 27, 2024 3:30 PM - Rajnish Katharotiya
In the ever-evolving world of technology, certain sectors have consistently demonstrated exceptional growth and innovation. The graphics processing units (GPUs) industry is one such sector, offering investors a golden opportunity for potentially high returns. In this blog, we'll delve into why inves...
Jun 6, 2024 2:47 AM - Parth Sanghvi
ROE vs. ROA: Which Metric is More Important for Investors? When evaluating a company's financial performance, investors often rely on various metrics to gauge profitability and efficiency. Two commonly discussed metrics are Return on Equity (ROE) and Return on Assets (ROA). Understanding the diff...
Jun 6, 2024 2:57 AM - Parth Sanghvi
When it comes to valuing an investment or a business, two of the most commonly used methods are Discounted Cash Flow (DCF) and Net Present Value (NPV). Both methods are essential tools in finance, but they serve slightly different purposes and are used in different contexts. This guide will explore ...