Search Results
58 results found with an empty search
- Smartphone App for University Students | Akweidata
< Back Smartphone App for University Students An all-purpose app for Ashesi students. Project from 2017 Life at Ashesi University, like any university, can be overwhelming and disorganized. To streamline this experience, I suggest the development of a versatile mobile app that centralizes various essential services, thereby aiding in effective time management for students. The university offers a range of services including student support, counseling, and tutoring. However, accessing these services often proves to be a cumbersome and time-consuming process. In addition to these, many students are unaware of the contact details for on-campus emergency services and national emergency numbers in Ghana. In critical situations, this lack of information could lead to wastage of precious time. To tackle these issues, the proposed app would be a comprehensive solution. It would feature functionalities like accurate weather forecasts by integrating with the Accuweather website for Berekuso forecasts, a meal plan balance checker linked with the Ashesi meal plan webpage, and a digital menu for campus eateries like Akornor and Big Ben. Additionally, the app would include a directory of contact details for Ashesi’s various services and emergency services, with the added convenience of calling these contacts directly from the app. This integration would ensure that all necessary information and services are readily accessible to students, thereby enhancing their university experience and safety. Pseudocode 1. When the app is started the homepage is displayed. 2. The homepage displays titles “Meal Plan,” “Weather,” “Ashesi Services,” “Food” and “Emergency Services.” 3. If “Meal Plan” is selected, the webpage of the Ashesi Meal plan is displayed. 4. If “Weather” is selected, the webpage for accuweather (set for Berekuso) is displayed. 5. If “Food” is selected restaurants in Ashesi are displayed. 6. Select any restaurant and their menu shall be displayed. 7. If “Ashesi Services” is selected a list of Ashesi Services are displayed. 8. Select any service and their contact details is displayed for calling . 9. If “Emergency Services” is selected a list of Emergency Services are displayed. 10. Select any emergency service and their contact details is displayed for calling . Figure 1: Flowchart * Due to the senstivity of some information within the app, kindly request for access. Upon access being granted, the links below shall be temporarily activated. Download APK via Github: https://github.com/akweix/Ash-App Download Android App via Thunkabale: https://x.thunkable.com/copy/b63301e1a6082169dd0d9aa036ac119d Previous Next
- Initial margin requirement for Derivative Trading | Akweidata
< Back Initial margin requirement for Derivative Trading A simplified VaR-based approach to calculate the initial margin requirement for Derivative Trading Previous Next
- How much time do I have left? - Version 2 | Akweidata
< Back How much time do I have left? - Version 2 Visualizing and Quantifying our most valuable asset: "Time"; Version 2 Previous Next
- Alternative Data Regressor Framework: Flow Chart | Akweidata
< Back Alternative Data Regressor Framework: Flow Chart A framework for linear regression of alternative data against financial asset prices - the flow chart 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
- How Much Time Do I have left? | Akweidata
< Back How Much Time Do I have left? Visualizing and Quantifying our most valuable asset: "Time" Previous Next
- Scrapping Oil related articles | Akweidata
< Back Scrapping Oil related articles Run on python via GoogleCollab # Install and set up necessary packages and dependencies !pip install selenium !apt-get update !apt install chromium-chromedriver import sys sys.path.insert(0,'/usr/lib/chromium-browser/chromedriver') from selenium import webdriver from selenium.webdriver.chrome.options import Options from bs4 import BeautifulSoup import pandas as pd # Set up Chrome options for Selenium chrome_options = Options() chrome_options.add_argument('--headless') chrome_options.add_argument('--no-sandbox') chrome_options.add_argument('--disable-dev-shm-usage') # Initialize the Chrome WebDriver with the specified options driver = webdriver.Chrome(options=chrome_options) # Fetch the Web Page url = 'https://news.google.com/search?q=oil%20prices' driver.get(url) # Get the page source and close the browser html = driver.page_source driver.quit() # Parse the Web Page using BeautifulSoup soup = BeautifulSoup(html, 'html.parser') articles = soup.find_all('article') # Extract the Necessary Information news_data = [] base_url = 'https://news.google.com' for article in articles: # Extracting the title and link title_link_element = article.find('a', class_='JtKRv', href=True) title = title_link_element.text.strip() if title_link_element else "No Title" link = base_url + title_link_element['href'][1:] if title_link_element else "No Link" # Extracting the date time_element = article.find('time') date = time_element['datetime'] if time_element and 'datetime' in time_element.attrs else time_element.text.strip() if time_element else "No Date" news_data.append([title, link, date]) # Store the Data in a DataFrame df = pd.DataFrame(news_data, columns=['Title', 'Link', 'Date']) csv_file = 'google_news_oil_prices.csv' df.to_csv(csv_file, index=False) # Download the file to your computer (only works in Google Colab) try: from google.colab import files files.download(csv_file) except ImportError: print("The files module is not available. This code is not running in Google Colab.") Future Projects: Relation of frequency of Oil related posts and sustainability risks Relation of frequency of Oil related posts and Stock Prices (General & Oil producing/intensive firms) Updated Code # Install and set up necessary packages and dependencies !pip install selenium !apt-get update !apt install chromium-chromedriver import sys sys.path.insert(0,'/usr/lib/chromium-browser/chromedriver') from selenium import webdriver from selenium.webdriver.chrome.options import Options from selenium.webdriver.common.by import By from selenium.webdriver.common.keys import Keys from bs4 import BeautifulSoup import pandas as pd import time from datetime import datetime, timedelta import re # Function to convert various date formats to a standardized format def convert_relative_date(text): current_datetime = datetime.now() current_year = current_datetime.year if 'hour' in text or 'hours' in text: return current_datetime.strftime('%Y-%m-%d') elif 'day' in text or 'days' in text: match = re.search(r'\d+', text) days_ago = int(match.group()) if match else 0 return (current_datetime - timedelta(days=days_ago)).strftime('%Y-%m-%d') elif 'minute' in text or 'minutes' in text: return current_datetime.strftime('%Y-%m-%d') elif 'yesterday' in text.lower(): return (current_datetime - timedelta(days=1)).strftime('%Y-%m-%d') else: try: parsed_date = datetime.strptime(text, '%b %d') return datetime(current_year, parsed_date.month, parsed_date.day).strftime('%Y-%m-%d') except ValueError: return text # Return the original text if parsing fails # Set up Chrome options for Selenium chrome_options = Options() chrome_options.add_argument('--headless') chrome_options.add_argument('--no-sandbox') chrome_options.add_argument('--disable-dev-shm-usage') # Initialize the Chrome WebDriver with the specified options driver = webdriver.Chrome(options=chrome_options) # Fetch the Web Page url = 'https://news.google.com/search?q=oil%20prices' driver.get(url) # Scroll the page to load more articles for _ in range(5): # Adjust the range for more or fewer scrolls driver.find_element(By.TAG_NAME, 'body').send_keys(Keys.END) time.sleep(2) # Wait for page to load # Get the page source and close the browser html = driver.page_source driver.quit() # Parse the Web Page using BeautifulSoup soup = BeautifulSoup(html, 'html.parser') articles = soup.find_all('article') # Extract the Necessary Information news_data = [] base_url = 'https://news.google.com' for article in articles: title_link_element = article.find('a', class_='JtKRv', href=True) title = title_link_element.text.strip() if title_link_element else "No Title" link = base_url + title_link_element['href'][1:] if title_link_element else "No Link" time_element = article.find('time') date = time_element.text.strip() if time_element else "No Date" news_data.append([title, link, date]) # Store the Data in a DataFrame df = pd.DataFrame(news_data, columns=['Title', 'Link', 'Date']) # Convert dates to a standardized format for i, row in df.iterrows(): df.at[i, 'Date'] = convert_relative_date(row['Date']) # Save the DataFrame to CSV csv_file = 'google_news_oil_prices.csv' df.to_csv(csv_file, index=False) # Download the file to your computer (only works in Google Colab) try: from google.colab import files files.download(csv_file) except ImportError: print("The files module is not available. This code is not running in Google Colab.") Previous Next
- Financial Performance of Ghana's political regimes from 1960 - 2000 | Akweidata
< Back Financial Performance of Ghana's political regimes from 1960 - 2000 Analysis of Economic Growth in Ghana, 1960 – 2000 – ARYEETEY & FOSU "Economic Growth in Ghana, 1960 - 2000" by Ernest Aryeetey and Augustin Kwasi Fosu examines the fluctuating economic growth in Ghana over four decades, marked by frequent policy changes and military coups. The study highlights the transition of Ghana's economy and its impact on the livelihoods of its citizens. Period Key Factors Impact on Growth Post-Independence (1960-1965) Kwame Nkrumah implemented his 7-year Plan, emphasizing high investments into public infrastructure and industry creation. The economy grew rapidly due to the investments, but the high government spending led to inflation and a decline in living standards. Busia and the Military (1966-1971) Busia and the military regime ushered pro-private capital policies, devaluing the Ghanaian Cedi and liberalizing the external sector. The economy initially grew due to the pro-business policies, but the devaluation of the cedi caused inflation and public anger, leading to another coup d'état. The Era of Five Regimes (1972-1983) This period was marked by economic decline due to high government intervention policies, low productivity, and external shocks such as drought and food shortages. The economy contracted significantly during this period, with GDP growth averaging only 2.2% per year. Inflation soared to 112% in 1983, and the government deficit reached 17% of GDP. After the Economic Reforms (1984-2000) The government launched the Economy Recovery Program (ERP) under the World Bank and the IMF, which liberalized the economy and led to increased growth. The ERP helped to stabilize the economy and promote growth, with GDP growth averaging 5.3% per year during this period. Inflation fell from 112% in 1983 to 10% in 1992, and the government deficit was reduced to 4% of GDP. Previous Next
- SustainabilityV4 | Akweidata
Profit is the only Green : Visualization of Swiss Stocks & SRI portfolios Sustainability BY SEAN AKWEI ANUM Abstract Socially Responsible Investing (SRI), which is increasingly popular, emphasizes social and environmental factors in investment decisions to promote sustainability. In theory, SRI outperforms, especially in the long run. While practitioners typically remain skeptical, this unique return-based sustainability assessment of Swiss Stocks demonstrates SRI’s over performance and ability to promote sustainability. Research Question Is SRI a significant means of promoting Sustainability? Sustainability, per the 1987 United Nations Brundtland Commission, means meeting present needs without compromising future generations, involving social, economic, and environmental aspects. In investments, it translates to SRI, blending social and environmental factors into investment decisions. This project seeks to quantitatively depict these sustainability dimensions for stocks and SRI portfolios on the SIX (Swiss Stock Exchange). Methodology Data Proxies The data required deals with the three sustainability parameters for each stock on the Swiss Exchange: Environmental, Social and Economic. Company Name Environmental Score Social Score Economic Score The Quantitative proxies are as follows: 1. Environmental: An ESG rating with a numeric individual score (pillar) for a firm’s environmental impact; 2. Social: An ESG rating with a numeric individual score for a firm’s Social impact; 3. Economic: a risk-adjusted measure of the firm’s expected return: Capital Asset Pricing Model (CAPM) Visualizing Three Parameters A 3D plot was chosen to visualize three quantitative parameters, effectively showing their relationship and intersections. Stocks with high environmental, social, and economic scores are classified as “Sustainable,” while those with low scores are deemed “At Risk.” Stocks with scores between these extremes are categorized as “Acceptable.” The final visualization seeks to visualize the relative distribution of individual stocks & SRI portfolios regarding the three parameters. Hence, a standardized score for each parameter was used. The logic was to ensure that all parameters could be drawn down to a somewhat “equal” scale, thus ensuring an informative visual effect. Constructing SRI Portfolios Using the collected individual stock data, four SRI funds were created: Negative Screening: This SRI fund excludes investments in companies or sectors that do not meet specific ethical, environmental, or social criteria. Best in class: This fund selects companies that outperform their peers in environmental, social, and governance (ESG) criteria within each sector. Thematic Approach: This fund focuses on specific sustainability themes or sectors, such as renewable energy or social justice. ESG integration: This fund incorporates ESG factors into traditional financial analysis to identify risks and opportunities not captured by conventional methods. Data Sources Data was collected for each of the three parameters. Data was attained via the Thompson Reuters financial market portal Refinitiv Eikon. Environmental Pillar Score (ESG rating) Measures a company’s impact on living and non-living natural systems, including the air, land and water, as well as complete ecosystems. Social Pillar Score (ESG Rating) Measures a company’s capacity to generate trust and loyalty with its workforce, customers and society through its use of best management practices. Economic Pillar Score ( Beta) A measure of how much the stock moves for a given move in the market. Note, the Economic score was further computed with the Capital Asset Pricing Model (CAPM), which is CAPM = Risk-free rate+Beta*(Risk Premium), where risk-free rate and risk premium in Switzerland is 1.135% Source: World Government Bonds and 5.5% Source: NYU respectively. Data was collected based on completeness. As such, despite the SIX listing 250 stocks, the project at hand uses 187. One stock, IGEA Pharma NV, was excluded as it was an extremely negative outlier that terribly affected the scale of the entire visualization. Constructing “Sustainable” and “At Risk Criteria” The Sustainability Criterion was defined as Environmental Score ≥ 70 (out of 100), Social ≥ 70 (out of 100); and Economic score ≥ 6.64% (Average Market Return). Consequently, the standardized scores were 1.05, 0.83 and 0, respectively. At Risk Criterion was defined as : Environmental Score ≤ 30 (out of 100); Social ≤ 30; and Economic score ≤ 3.34% (one standard deviation below Market Average Return). Consequently, the standardized scores were -0.30, -0.68 and -1 respectively. Conditions are based on core financial theories. Data for SRI Portfolios Regarding the Negative Screening and Best in Class Approach, using the ESG data collected, I easily constructed said portfolios. However, for the Thematic Approach and ESG integration, I replicated existing funds employing these strategies. They are the “Ethos Swiss Governance Index Large” and the “ETHOS II - Ethos Swiss Sustainable Equities -A” respectively. Final Visualization The graph is interactive. Average-sized points represent a stock on the Swiss Exchange. The bigger Orange points represent SRI portfolios, and the Big Black point represents the Market Average. Results and Conclusion Market’s Performance The sustainability cuboid includes 11% of stocks and three-quarters of SRI strategies, whereas the at-risk quadrant contains 6% of stocks. The general market performance is deemed acceptable, with many stocks nearing the Sustainability cuboid. Despite needing substantial progress, these findings indicate a promising trend towards sustainability in the Swiss Stock Market. SRI Performances To answer the Research Question, SRI funds appear to promote sustainability. This is supported by the visualization showing 3 out of 4 strategies as sustainable. Contrary to expectations, “ESG Integration” is the only strategy classified as non-sustainable. In theory, the best strategy should be “ESG integration”, whereas the other three are seen as simplistic and lacking a nuanced ESG assessment concerning market returns. My paradoxical result likely arises because, unlike simpler strategies, “ESG Integration” involves more subjective and active management, leading to significant performance variations among different managers. Testing this hypothesis with another fund using “ESG Integration” yielded a “Sustainable result”, highlighting the classic debate between active and passive management but now within SRI. Concluding Remarks Ironically, firms with controversial reputations like Nestle, UBS, and Credit Suisse have good non-economic scores, while Cantonal banks unexpectedly show low scores. This raises questions about how these public entities might be causing more social and environmental harm and calls for a deeper examination of the legitimacy of ESG scores.
- Manipulating File Paths: Backward to Foward Slashes | Akweidata
< Back Manipulating File Paths: Backward to Foward Slashes A program made to convert backward slashes in file path names to foward slashes. Targeted for Windows users when copying paths to R or Pthon. 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
- Do Sustainable Funds in Switzerland outperform the Market? | Akweidata
< Back Do Sustainable Funds in Switzerland outperform the Market? What is the performance of "sustainable" funds in relation to the market? Let's explore the case of the SIX Swiss Exchange Previous Next