top of page

Search Results

Search this site

56 results found with an empty search

  • Sustainability Dimensions of Stocks on the SIX:Render 3 | Akweidata

    < Back Sustainability Dimensions of Stocks on the SIX:Render 3 Quantitatively assessing Brundtland's Dimensions (1987). The case of the SIX View Plot here: https://www.akweidata.com/sixsustainabilitydimensions Previous Next

  • Scrapping Data using Python | Akweidata

    < Back Scrapping Data using Python A Python application designed to generate a histogram depicting the frequency of articles published on Google News in 2022 concerning '@celebjets'. Background Created by then teenager Jack Sweeny in 2020, @celebjets (now suspended) was a twitter account that tracked the location of celebrities' jets. The account gained worldwide notoriety through 2021 and 2022 mainly due to Jack Sweeny's altercation with Elon Musk regarding privacy and safety concerns with tracking Elon's Jet. But more importantly the posts from the account brought to light conversations on the 'vanity-filled' lifestyle of celebrities and the significant CO2 footprints they leave with their obnoxious use of private jets. Problem Formulation, Decomposition and Abstraction With the given prompt at hand, we need to exhaustively understand the problem space in order to efficiently and effectively move from the undesired to the desired state of affairs. The problem at hand is not monolithic, thus, we need to break it down before conceptualizing any solutions. Breaking down the problem requires the employment of the Computational Thinking concept known as Decomposition . By separating the problem at hand into sub-problems, the task becomes more approachable as one is quickly able to see how possible conceptual frameworks (in the form of existing python commands) can be employed and knitted to solve the problem. However, before diving into decomposition, we need to understand that the prompt does not encapsulate the entire problem space. Key components of the problem space deal with the nature of the file news-celebjets.txt. How is the data organized? Where are the dates stated? What is the format of the dates? How can we work with this format? Thus, I ran the html code and manually viewed a sample (the first ten) of the articles to attain a brief idea of the nature of the data. My findings were as follows: The data is not primary but secondary data: some analysis has already been made. Data is very well structured: Article Cover Picture; Logo and name of Publisher; Title of Article (Hyperlinked); The Date List of Articles appears to consistently follow the structure stated above. The dates appear to have the same format through out: Month and day; example: Dec 14 Intuitively, from my findings, I have already applied the Computational Thinking concept of Patterns and Generalizations. By identifying the repeated structure of the list of articles, I wondered, can loops or some other iterative command assist me with extracting the dates? With these insights at hand, I attained a greater understanding of the problem space. Consequently, I employed the General to Specific decomposition technique The General to Specific technique involves breaking down a problem from a general perspective and then adding specific and more detailed components . For the given problem, as it is not open-ended and specific requirements were given, I found this technique to be the most appropriate. The results of my decomposition are as follows: General Problem: Analyze news articles and create a histogram representing the number of articles published per week Listed below with the alphabets a, b, c,d and e are the "definitions of the desired characteristics of the solution" = Subproblems . To address these charactersitics/subproblems, we need to get specific. Hence, below each Subproblem , listed in Roman numerals, are the specifications written in pseudocode . Note, that with the exception of subproblem "a" and c" , I relied heavily on Chatgpt to write out the specifics for the other subproblems as I had zero experience with the commands required. a. Read the scrapped data from the text file (news-celebjets.txt). b. Find the publishing dates of the news articles. c. Sort the publishing dates. e. Plot a histogram to represent the number of article count per week Figure 1: Abstraction Algorithmic Solution and the Agile Process An algorithm is a well-defined sequence of instructions that takes one or more input values and produces output values. Per the abstraction above, we have an idea of the desired solution's input, output and sequence of instructions. In the main.py file attached, I have generated a solution - pictured below in Figure 2. Following the decomposition phase's specifics, I have extensively commented throughout the lines of code on my reasoning and methods, which I shall not repeat here. Instead, in this section, I would comment on the role of Chatgpt in my Agile solution creation process. Figure 2: My Final Histogram Previous Next

  • Paradox of Choice and Utility Maximization: Music | Akweidata

    < Back Paradox of Choice and Utility Maximization: Music Traditional Asset Pricing models are conceptually based on utility maximization. However, what about the role of the quantity of choices in utility maximization? When studying utility maximization in finance, we typically look at an investor's efficiency/utility frontier. But what of the dynamic of choices? With financial instritutions offerring a wide host of investment solutions, the Paradox of Choice should certianly play a key role in the frontiers. Paradox of Choice Theory: The Paradox of Choice, a concept popularized by psychologist Barry Schwartz, suggests that while some degree of choice is necessary and beneficial, there comes a point where an excess of choices can lead to decreased utility. Increased Complexity: More choices can increase the complexity of the decision-making process. This can lead to anxiety, stress, and indecision, which can reduce overall utility or satisfaction. Regret and Opportunity Costs: With more options, individuals may experience regret or concern about missing out on unchosen alternatives. The awareness of opportunity costs can diminish the satisfaction derived from the chosen option. Expectation of Perfection: A multitude of choices might lead individuals to expect a perfect decision. When this expectation is not met, it can result in lower satisfaction. A simple illustration of the Paradox of Choice: Music Selection A modern issue at hand is the selection of the right song for a particulair activity. with apps such as Spotify offerring over 20 million songs, one can quickly feel overwhelemed. Thus, resolving to currated playlists, appears to be a utility maximization route - essentially removing choices Paradox of Choice in Music Selection Overwhelming Options: With streaming services offering millions of songs, listeners are faced with an almost infinite array of choices. This abundance can make the decision-making process overwhelming. Decision Fatigue: The effort required to sift through numerous options can lead to decision fatigue, where the listener becomes too tired to make a choice, or defaults to familiar options, thereby missing out on potentially enjoyable new music. Regret and Second-Guessing: Even after choosing a song, listeners might experience regret or second-guess their choice, wondering if there might be a better song they haven't discovered yet. This can diminish the satisfaction derived from the chosen song. High Expectations: With so many options, listeners might develop unrealistically high expectations for each song they choose. If a song doesn't immediately meet these expectations, they might skip it, perpetuating the cycle of searching without finding the "right" song. ... this leads to a decrease in utility To further conceptualize and understand the paradox of choice to test utility, at least within the field of music, I developed a minmalistic music app. It simply allows one to replay a song or change the song - to a random song they have no control over! The app is very basic and uses music from Youtube. A preselected playlist was built into the app. The objective of the app is to simplify the musical experience by reducing choices and observing the effect on the users utility. Try it out here. App was built for Android: https://github.com/akweix/Music_Minimalism Previous Next

  • Photography Tool: Black & White Conversion | Akweidata

    < Back Photography Tool: Black & White Conversion A basic photo editor to convert PNG pictures from color to Black and White Previous Next

  • Value at Risk (VaR) for a portfolio | Akweidata

    < Back Value at Risk (VaR) for a portfolio Simple Tool using a historical simulation to find VaR Previous Next

  • Web scrapping Box Office Sales | Akweidata

    < Back Web scrapping Box Office Sales A python code used to web scrape data from Box Office Mojo's Website. The objective at hand is to attain weekend box office sales in order to test a correlation of Sci -fi movies and Tech stock prices. Thus, a python code was developed to web scrape data from Box Office Mojo's Website in a manner that that shows the Top 10 box office sales for each weekend. Additionally, using OMDb API , the genre for each movie was found. Significant aspects of the code developed was based on a similair project by Jonathan Bown on Kaggle *My actual API key from OMDb API has been removed in the code below import requests from bs4 import BeautifulSoup import pandas as pd from google.colab import files import re def scrape_weekend_box_office(weekend_url): response = requests.get(weekend_url) soup = BeautifulSoup(response.text, 'html.parser') table = soup.find('table') if not table: return [] rows = table.findAll('tr')[1:] movies_data = [] for row in rows[:10]: cols = row.findAll('td') if cols and len(cols) > 3: movie_name = cols[2].get_text(strip=True) weekend_gross = cols[3].get_text(strip=True) movies_data.append((movie_name, weekend_gross)) return movies_data def check_genre(movie_name, api_key): params = {'t': movie_name, 'apikey': api_key} response = requests.get('http://www.omdbapi.com/', params=params) data = response.json() if 'Genre' in data: genres = [genre.strip().lower() for genre in data['Genre'].split(',')] return 1 if any(genre in genres for genre in ['sci-fi', 'fantasy', 'action']) else 0 return 0 def scrape_year_weekends(year, api_key): base_url = f'https://www.boxofficemojo.com/weekend/by-year/{year}/' response = requests.get(base_url) soup = BeautifulSoup(response.text, 'html.parser') links = soup.select('td.a-text-left a') all_data = [] seen_weekends = set() genre_cache = {} for link in links: weekend = link.get_text(strip=True) weekend_link = 'https://www.boxofficemojo.com' + link['href'].split('?')[0] match = re.search(r'(\d{4})W(\d+)', weekend_link) if match and weekend_link not in seen_weekends: seen_weekends.add(weekend_link) weekend_number = match.group(2) top_movies = scrape_weekend_box_office(weekend_link) for rank, (movie_name, weekend_gross) in enumerate(top_movies, start=1): if movie_name not in genre_cache: genre_indicator = check_genre(movie_name, api_key) genre_cache[movie_name] = genre_indicator else: genre_indicator = genre_cache[movie_name] all_data.append({ 'weekend_number': int(weekend_number), 'weekend': weekend, 'rank': rank, 'movie_name': movie_name, 'weekend_gross': weekend_gross, 'is_action_sci_fi_or_fantasy': genre_indicator }) return all_data omdb_api_key = ' ' # Replace with actual OMDb API key year = 2019 data = scrape_year_weekends(year, omdb_api_key) df = pd.DataFrame(data) df.drop_duplicates(subset=['weekend_number', 'rank'], inplace=True) df.sort_values(by=['weekend_number', 'rank'], inplace=True) csv_file = f'weekend_box_office_{year}.csv' df.to_csv(csv_file, index=False) files.download(csv_file) Previous Next

  • The Solow Model and Human Capital in Developing Economies | Akweidata

    < Back The Solow Model and Human Capital in Developing Economies How can human capital enrichment lead to long-run economic growth? Human Capital and Economic Growth How enriched are the minds of the people in a society? How healthy, creative, and efficient are they? How can they bring about disruptive innovation (Robinson & Acemoglu) to lead an economy into virtuous cycles of prosperity? This is all answered by the workforce’s level of human capital. With various definitions at play, human capital can be basically defined as the set of skills used to efficiently create value in an economy. Thus, indicators of human capital are level of education, technical training, experiences, habits, and level of health. In today’s economy, natural resources nor population sizes are the major determinants of growth – human capital is. The paper by Dr. Armah titled, “Addressing Quality Issues In African Higher Education: A Focus On Ghana’s Emerging, Private, Graduate, Business Higher Education Sector,” focuses on one of Ghana’s key determinants and indicators of Human Capital – Higher education. Through the research key issues pertaining to the flaws in Ghana’s Higher Education system are put to light as limitations of human capital enrichment, thus, prohibitors of economic growth. With proposed solutions pertaining to more STEM focused teachings within business, Armah, puts to light proposals that would adequately enrich Human Capital, thus, accelerate economic growth in Africa. Technology is the Rosetta stone of the economic growth literature . As such, emphasis on STEM education certainly is the best avenue for enriching human capital. Supported by the central argument in Easterly’s (2011) paper, technology is the largest determinant for vital long-run growth. Said technologies are only brough into existence by enriched workers with high levels of human capital. Sighting cases from the Singapore, Japan, Malaysia, China, and the Scandinavian countries, we come to see a positive relation with their prosperity and investments into their human capital. Specifically viewing Singapore, a nation with essentially no natural resources, and a small population, how is such a country able to attain such high sustainable growth? The answer lies in their human capital investments. With investments in their education, sanitation, and healthcare systems, Singapore is a testimony to the importance of human capital in creating sustainable long-run growth. Poverty and the Resource Curse i) According to the World Bank, poverty can be defined in simple absolute terms – those living on less than $1.9 per day. However, according to the UN, the concept of poverty entails much moe than income levels, it also refers to hunger, education availability, healthcare, discrimination and participation on decision making. UN broadly puts poverty into a deeper light by thoroughly seeing poverty as an extremity of poor living standards. Calculating poverty is quite tricky. But there are two key distinctions in measuring poverty: Absolute Poverty or Relative Poverty. Absolute poverty refers to a set standard or poverty line which can be used to compare and assess various countries at different times. However, relative poverty calculations are defined on the basis of environmental context. The measure varies from country to country and from time to time. Hence, absolute can be used for strong comparative analysis however relative calculations of poverty are able to thoroughly contextualize and deliver an accurate understanding of a region’s poverty. ii) The major macroeconomic determinants of poverty: 1. Unemployment Rate of unemployment is a clear macroeconomic indicator and determinant of poverty. Without sufficient work available, multiple households would be axed from their major source of income. 2. Inflation With high inflation rate, particularly that of food inflation, households purchasing power for staple goods would reduce. This essentially leads to household’s inability to make ends meet due to rising prices and falling income purchasing power. 3. Level of income Lastly, the most obvious determinant is income. With low incomes, households are pushed closer to the poverty line. iii) According to Esther Duflo’s paper, the poor population tend to live in large households 6 -12 members. The poor population live below $2.16 per day. They earn most of their money via temporary jobs, low skilled (low specialization) work and working in small scale ventures. They tend to be unbanked, have no form of insurance, and the only major asset they own is their land. iv) Countries in Africa such as Liberia, Congo, Zimbabwe and Ghana are typically poor despite their abundance of resources is due to the marriage of these four main concepts; 1. Resource Curse Also known as the paradox of plenty, resource abundant countries typically put themselves in a trap. They focus on industries related to their natural resources as their main source of generating wealth. As such, they fail to diversify the economies adequately. Thus, price shocks or market preference shifts pertaining to their main commodity (say Gold or Cocoa in Ghana or Oil in Gabon), leads to huge economic difficulties in said countries. As such, through their abundance of a few resources and focusing on just those resources, they leave their economies vulnerable, leading to poor economic performance. 2. The Dutch Disease The Dutch Disease, very similar to the resource curse, resonates the same story of a lack of economic diversification in resource abundant countries. However, in the case of the Dutch disease, said countries reduce investments in other sectors due to the discovery of a natural resource. The decrease investments in those sectors leads to unemployment and also reduces the economic diversity of the nation. Other unseen negative effects such as fall in total exports and a higher local currency. 3. Weak Institutions Despite having high amounts of resources, said countries cannot manage the production effectively. Till date, Nigeria does not know the exact amount of oil it drills each day! Weak institutions are instrumental for growth, as Acemoglu and Robinson repeatedly say. With weak institutions, corruption also prevails as in the case of Gabon in the Elf-Affair. Corrupt officials get in bed with multinational executives, thus, steal money the nation needs to develop as a whole. Hence, revenues from said countries resources are not shared with the society – the largest share goes to political cronies. 4. Poor Governance Relating to the earlier point, poor governance leads to a lack of transparency and accountability. This enables corruption to thrive. Solow Model From Wolphram Alpha: https://demonstrations.wolfram.com/SimpleSolowModel/ The graph below, created on Wolfram Alpha, shows steady state k*. K* is at a steady state when I = D, or better said where investments is equal to depreciation. Simple Solow Growth Model: Steady State Simple Solow Growth Model: Higher than k* In the long run, the economy always adjusts itself, thus, would always move towards the steady state. As such K would eventually shift from k1 towards the left (towards the initial K*). Logically speaking, if the economy is to operate with a capital stock higher than its steady state say at K1, we would come to find that depreciation is much higher than investment. If such is to occur in an economy, we would observe that the rate of capital entering the economic machine (investment) is less than that leaving economy (depreciation of capital goods). Thus, in the long run, or simply put as time goes on, if the rate at which capital is reducing is higher than capital coming inside. Thus, the amount of capital stock would gradually reduce from K1 up until it reaches K*. Thus, K moves towards the steady state k*. Previous Next

bottom of page