Search Results
Search this site
56 results found with an empty search
- 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
- Electricity Consumption as a proxy of production: Draft 1 | Akweidata
< Back Electricity Consumption as a proxy of production: Draft 1 Using publicly available data on Swiss Power Consumption, this exploration seeks to identify an association with power consumption and select firms output https://www.swissgrid.ch/en/home/operation/grid-data/current-data.html#wide-area-monitoring https://www.ewz.ch/en/about-ewz/newsroom/current-issues/electricity-shortage/city-zurich-energy-consumption.html https://data.stadt-zuerich.ch/dataset/ewz_stromabgabe_netzebenen_stadt_zuerich https://data.stadt-zuerich.ch/group/energie Work in Progress Previous Next
- Game Theory: Prisoner's Dilemma Strategies Tools | Akweidata
< Back Game Theory: Prisoner's Dilemma Strategies Tools Recreating and Simulating Robert Axelrod's 1980 Computer Tournament. Previous Next
- Dynamic View of Ghana's Unemployment | Akweidata
< Back Dynamic View of Ghana's Unemployment Investigating the trend and segmentation of employment in Ghana Previous Next
- Dynamic view of Ghana's Insurance Industry | Akweidata
< Back Dynamic view of Ghana's Insurance Industry Work in progress Previous Next
- Alternative Data Regressor: V1 | Akweidata
< Back Alternative Data Regressor: V1 A Python Program to attain a linear regression of some alternative data against financial asset prices . A CSV file is the input. The output is the regression results. The provided Python program is designed to process time series data from a CSV file and execute a series of analytical steps based on a predefined decision tree. Key functionalities include: Reading a CSV File : The user inputs the path to a CSV file, which the program reads into a DataFrame. Stationarity Testing : It tests the time series data for stationarity using the Augmented Dickey-Fuller test. Adjusting for Non-Stationarity : If the data is non-stationary, it applies a log transformation to stabilize the time series. Re-testing for Stationarity : After transformation, it retests the data for stationarity. Significance Testing : Conducts an Ordinary Least Squares (OLS) regression to test the significance of the relationship between the time series and a dependent variable. Model Development and Evaluation : If a significant relationship is found, the program proceeds to develop a baseline regression model, which is then refined and evaluated based on its R-squared value. Output : The program outputs the results of the stationarity tests, significance tests, and the R-squared value of the regression model. import pandas as pd import numpy as np from statsmodels.tsa.stattools import adfuller from statsmodels.regression.linear_model import OLS import statsmodels.api as sm from scipy import stats import matplotlib.pyplot as plt from sklearn.model_selection import train_test_split from sklearn.metrics import r2_score def test_stationarity(timeseries): # Perform Dickey-Fuller test: dftest = adfuller(timeseries, autolag='AIC') return dftest[1] # p-value def adjust_non_stationarity(data): # Adjusting for non-stationarity (example: log transformation) return np.log(data) def significance_testing(X, y): # Perform significance testing (example: OLS regression) X = sm.add_constant(X) # adding a constant model = OLS(y, X).fit() return model.pvalues def main(): # Load data file_path = input("Enter the path to your CSV file: ") df = pd.read_csv(file_path) # Assuming the time series column is named 'timeseries' timeseries = df['timeseries'] # Step 1: Test for Stationarity if test_stationarity(timeseries) > 0.05: # Step 2: Adjust Data for Non-Stationarity timeseries = adjust_non_stationarity(timeseries) # Step 3: Re-test for Stationarity if test_stationarity(timeseries) > 0.05: print("Data is still non-stationary after transformation. Ending process.") return else: print("Data is stationary after transformation. Proceeding with analysis.") else: print("Data is stationary. Proceeding with analysis.") # Step 4: Significance Testing # Assuming another column 'dependent_var' as the dependent variable pvalues = significance_testing(df[['timeseries']], df['dependent_var']) if any(pval < 0.05 for pval in pvalues[1:]): # Ignoring the constant's p-value print("Significant correlation found. Proceeding to model development.") else: print("No significant correlation found. Ending process.") return # Steps 5, 6, 7: Develop, Refine, and Evaluate Regression Model # This is a simplified example using OLS regression X_train, X_test, y_train, y_test = train_test_split(df[['timeseries']], df['dependent_var'], test_size=0.2, random_state=0) model = OLS(y_train, sm.add_constant(X_train)).fit() predictions = model.predict(sm.add_constant(X_test)) print("Model R-squared:", r2_score(y_test, predictions)) # Step 8: Interpret the Regression Line # This step is more analytical and depends on the specific model and data # Step 9: Comparative Analysis if __name__ == "__main__": main() Previous Next
- Dynamic view of Ghana's Forestry | Akweidata
< Back Dynamic view of Ghana's Forestry Work in progress 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.