Week 1

Here are three charts from Rapidcharts to get the page started.


Week 2

The first chart beneath has been created using a given API. The second chart was created using data from the same API, but the data file is stored locally in the GitHub repository.


Week 3

The following two charts have been somewhat manually adjusted. For the first chart, Bloomberg revenue estimates were added to an existing csv from Statista. The second chart has data which was entered manually.


Week 4

Here are two charts which have been created using two different APIs.


Week 5

These charts, similarly to the previous charts, gets data from an API. But in this case, a loop is used to download the data. Click here to see the loop code.


Week 7

This chart is charting data which has been collected using a scraper. The scraper can be found here.


Week 8

During the Health and Economics talk at the Festival of Economics, questions arose about the policy decisions which had taken place in the UK. One being the lockdown, and discussion was held about how costly this was for the economy. One of the panelists, brought up the example between Sweden and Denmark. Sweden decided not to impose a lockdown, whereas, Denmark did. This chart shows that, even without a lockdown, the pandemic has been very expensive for economies with consumer spending dropping. This is likely due to consumers acting rationally. In this case, this involves consumers reducing the chance of exposure to the virus. So although, a lockdown wasn't imposed in Sweden, consumers' rationality led to them staying at home. Therefore, the lack of economic activity is unlikely to be solely caused by a lockdown. This is, of course, speculation, trying to quantify rationality is a bit tricky.


Week 9

This chart contains data from the St. Louis Fed and the Nasdaq. The data has been standardised. This is because without standardisation the analysis provides nothing insightful as the SnP composite can continually grow upwards whereas yields behave differently. This chart shows that as yields decrease, the SnP composite tends to increase in value. This makes sense as investors are rationally and will allocate their assets where returns are. Note: values appear negative but this is due to the standardisation process. R-squared is 0.46, and therefore, roughly half of the observed variation can be described by the models inputs. In other words, half of the time, that the movements in these two variables are correlated, it is due one of them moving.


Week 10

These two charts contain an interactive element.


Preamble

This is no excuse for bad work product, but I want to set the stage. This project was completed in one night, less than 12 hours, and I had little to no coding experience at the time. Therefore, it does not use any form of maths to determine any outcomes, but the amazing pattern recognition of my brain. I am redoing this project, implementing many more factors which will hopefully result in a more conclusive conclusion.


Do members of congress take advantage of insider information?

There have been speculation about insader trading occurring within the US government for a while. A Twitter account, who gained a large following before being removed, tweeted about House Speaker Nancy Pelosis' trades. This idea intrigued me and I thought I'd investigate further by analysing which companies had seen a large amount of money coming their way through goverment deals since Quarter 2 of 2020.


Above is a a chart of the historic Boeing stock price, and a table representing trades which occured since the second quarter of 2020. There were a lot of purchases made, with seven contracts given to Boeing, one in each quarter, with an average size of $5.2Bn, this transaction history doesn't suggest foul play. Nor do the returns, out of six purchase orders only two have performed well.


Lockheed Martin Corp. has registered the largest amount of contracts by monetary value. The average contract being worth $10.1Bn, and Lockheed receiving one in each quarter. Their share price hasn't moved at all. Nor have many congress members been trading this stock. A trade giving a 4% return is rather lackluster in one of the biggest growth period stock markets have ever seen.


Raytheon Technologies Corp. managed to get a government deal once every quarter, just like the previous two companies. Furthermore, each deal that was made was worth an average of $4.4Bn. Unlike the other two companies Raytheon's stock grew by a significant amount in the questioned time period. However, there was only one trade made, and this congress member bought and sold within the same quarter so determining the return is not possible.


To Conclude:

To gather government contract data, I used an API. I had to fetch the data and download it. Furthermore this data was cleaned to removed unwanted information. The data regarding congress members trading history was gathered from a different API. Again this data was gathered by fetching it in python, and cleaning it. I would include a public link to the colab file, but a private API key was used. The data regarding the pricing history of the stocks was sourced using Yahoo Finance, and downloaded into a .csv file.

One of the complications with working with this data is that its only released quarterly, and therefore, it is hard to analyse whether trades were made knowing insider information. Furthermore, there have been cases where congress members submit that trading history late, and therefore won't show up in this analysis. Unfortunately, there is no real solution to overcome these as the government does not provide more detailed information.

Given my analysis of the three stocks which were awarded the largest amount of contracts by monetary value, I would conclude that there is not insider trading occuring within these stocks. As for other stocks which have not been analysed, and there are a lot, insider trading could be occorring. Furthermore, there are cases where government contracts haven't been awarded but private ones have and members of congress and traded well enough to put them in a position to get big rewards, of course this is just speculation.