The authors of ARMA Models for Trading claim that they achieved about 3x higher return predicting the values of S&P 500 using ARMA compared to buy and hold strategy. Inspired by these promising results, I implemented the model in Python.
Logging can help you better understand the flow of a program and discover undesirable behaviour which you might not even consider while developing. Logs give you information about scenarios that an application is going through. You can label this information according to its importance: debug, info, warning and errors. Occurring errors can provide more insights than a stack trace by telling you what the program state was before it arrived at the line of code where the error occurred.
When you’ve been investing for a longer time, you usually gathered equities (stock, ETFs, crypto-currencies) that you were adding to your portfolio at different prices. When you want to reduce some of these shares from your portfolio, picking which ones you want to sell or picking a computation method which will be used to calculate your gain can make a significant difference in the taxes you owe.
According to the first-in-first-out (FIFO) valuation method of capital gain, it’s assumed that equities are sold in the order in which they’re bought. In other words, the oldest shares are sold first. A detailed description of this method can be found in many places, e.g. here. In this post, I will focus on the implementation of the FIFO method in Python.
Stocks screeners are effective filters when you have a specific idea of the kinds of companies in which you are looking to invest. There are tens of thousands of stocks listed on world exchanges so it’s time-consuming to browse them manually. In this post I will show you have to built your own free stock screener using Python.
The most popular library to create GUI in Python is Tkinter, which is a part of standard Python installation. Tkinter is a mature and stable tool, widely ported and relatively easy to learn. However, it is also quite old with many drawbacks, among them, it has a limited set of widgets. Although the simplistic model is easy to learn, Tkinter also becomes cumbersome with more complex interfaces. Above all, it does not support mobile and web application development.
Depending on the settings, a list box can be set to allow the user to select only one of the available options or multiple options. If the list is long what often happens if we work with a larger set of data, a filter used to select a few values is a handy addition. Using the filter, you can narrow down the list of values by typing a string of text in the search field above the list. The values that do not match the string are removed from the list. This particular filter needs pressing an ‘enter’ key to start processing the data. In Python Tkinter a list box is represented by Listbox widget.
Wordpress editors are set to build web pages even with no knowledge of HTML principles. The latest editor, Gutenberg, is designed in a way similar to a rather familiar for most users MS Word’s interface. It has various tools for editing texts, adding images with their further adjustments, inserting links, etc. Basically, the working process is intuitive and understandable even if the user has no experience of working with any HTML editor at all. The magic of HTML tags and CSS styles is behind the scene. Any step you proceed in creating a web page is automatically supported by an appropriate HTML code. However, if you have some skills and knowledge in direct coding, it is also possible to use an HTML code viewer that displays the code of the web page you create. It allows you to grasp full control over the HTML code and webpage appearance.
When interacting with GUI, a user should be able to supply only valid events at any given time. Thus if an application requires a user to perform event A before event B, the interface should ensure that event B is not possible until event A has been completed. It can be achieved by making certain GUI elements disappear or become disabled.