Search Results
56 results found with an empty search
- Sustainability Dimensions of Stocks on the SIX:Render 1 | Akweidata
< Back Sustainability Dimensions of Stocks on the SIX:Render 1 Quantitatively assessing Brundtland's Dimensions (1987). The case of the SIX Previous Next
- ESG Strategies: Passive and Active Management | Akweidata
< Back ESG Strategies: Passive and Active Management Do the laws of passive and active strategies also affect sustainability investing? I recently concluded a sustainability data visualization project. The draft of the visualization is below Viewing the plot, I sought to understand the sustainability of stocks on the SIX. Parameters were used to identify sustainability in terms of ESG scores (70 and above) and Economic score (having an expected return above the market return). I developed four sustainable funds based on the ESG findings and market returns. Additionally I used ETHOS fund data found on Swiss Fund Data to develop the sustainable funds. The funds developed were: Negative Screening Best in Class Approach Thematic Approach ESG integration Against the staus quo, ESG integration was the only fund that was not "sustainable." Typcially ESG itegration is hailed as one of the most effective and practical strategies for promoting sustainability. Why is this the case? Unlike the first three strategies which are very basic to implement, when it came to the ESG integration fund, I randomly picked the ETHOS fund and duplicated the stock selectio - an in this case per the basic quantitaive metric developed, said fund was not . However, when I picked another ESG integrated fund its performace was sustainable. It appears that ESG integration has greater levels of subjectivity and the funds constructed across traders are likely to differ much greately than the previous 3 strategies. Thus, one can argue the element of the manager's skill in the active management of an ESG integrated fund plays a greater role in the fund's performance as compared to the other 3 strategies. Could this be the case of "passive" and active management of portfolios? Future works: Compare performace of ESG integrated funds Calculate the average return of ESG integrated funds vs "passive" strategies (Negative screening, Best In Class Approach ~ basic strategies) Do the variations of ESG integration strategies and basic sustainability stratigies vary across market types (Geographic and effeciency wise)? Previous Next
- Hedonic Valuation Model: Real Estate in Zurich | Akweidata
< Back Hedonic Valuation Model: Real Estate in Zurich With significant portions of banks portfolios consisting of mortgage loans, it is paramount to develop a strong model for valuating real estate. https://akweix.shinyapps.io/HedonicValuationModel/ 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
- Plain Vanilla Bond Price Calculator | Akweidata
< Back Plain Vanilla Bond Price Calculator A web application that takes the arguments of FV, Coupon Rate, YTM and Periods to price a Plain Vanilla Bond Github: https://github.com/akweix/vanilla_bond_price_calculator Previous Next
- Cocoa Production: West Africa - 2022 | Akweidata
< Back Cocoa Production: West Africa - 2022 Work in progress Previous Next
- 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
- Data Visualization of the Dynamic Efficiency of Oil and Gas Production in Ghana | Akweidata
< Back Data Visualization of the Dynamic Efficiency of Oil and Gas Production in Ghana A comprehensive tool for understanding the Real-time Efficiency of Oil and Gas production in Ghana https://akweix.shinyapps.io/trial_app/ Welcome to my R Shiny web app, the "Data Visualization of the Dynamic Efficiency of Oil and Gas Production in Ghana.” This web app leverages a myriad of data science techniques, including interactive visualizations, machine learning, sentiment analysis, natural language processing, data analytic tools and web scraping, to provide real-time, comprehensive analysis of Ghana’s oil and gas sector. The goal is to enhance information efficiency, market efficiency, and resource management efficiency, making it a valuable tool for practitioners, academics, and policymakers alike. The application is primarily centred on Ghana, especially regarding the visualizations. However, the data analytic tools developed can be applied to all markets and regions. Additionally, despite the application presenting key insights and tools that are applicable to both the Oil and Gas industry, greater emphasis was placed on Oil production due to its overall greater share of Ghana’s energy market and its more dynamic nature. anum_sean_data_science_final_report .pdf Download PDF • 2.66MB Previous Next
- frankenstein.io - Draft 1 | Akweidata
< Back frankenstein.io - Draft 1 Restructuring & Simplifying "Frankenstein codes" With the emergence of LLMs alongside the traditional sources of community shared codes (Stackoverflow, Github, etc), most coding projects are nothing more than Frankenstein codes - code generated by picking up sections from various sources and combining them together into one project - notoriously common for unskilled programmers or coders wishing to maximize productivity. "Frankenstein.io" is an AI-powered web application designed for coders. It takes full code submissions and, using guided objectives, logically restructures the code to simplify it while ensuring the output remains exactly the same as the original. Additionally, the application includes a citation tool that tracks and cites open-source contributions and other sources from which the code is derived. Logical Breakdown: Code Simplification Frankenstein.io allows users to input full code submissions, which are then analyzed and restructured using advanced AI algorithms. The primary goal is to ensure that the simplified code produces the same results as the original. Additionally, the platform provides a detailed narrative explaining the changes made during the simplification process. Citation Tool To enhance transparency and accountability, Frankenstein.io tracks the sources of code snippets used in the simplification process. It automatically generates citations for open-source contributions and displays these citations alongside the simplified code. Technology Stack Frontend The frontend of Frankenstein.io is built using HTML, CSS, and JavaScript, with frameworks like React.js or Vue.js. For a more robust structure, Next.js or Nuxt.js frameworks are employed. Backend The backend is developed using Node.js with Express.js or Python with Flask/Django. AI and ML models, such as TensorFlow or PyTorch, are used for code analysis and restructuring. The database management relies on MongoDB or PostgreSQL. AI/ML Natural Language Processing (NLP) is utilized for understanding code objectives, while machine learning models identify and apply code simplifications. Version Control & Deployment For version control, GitHub or GitLab is used. The application is containerized using Docker and orchestrated with Kubernetes. Deployment is managed on platforms like AWS, Google Cloud, or Azure. Development Plan Research & Planning Initial steps include conducting market research to understand the target audience's needs and defining the specific objectives and requirements for the AI algorithms. Planning the user interface and user experience is also crucial. Design & Prototyping Wireframes and mockups for the web application are created, followed by the design of the UI/UX to ensure a seamless user experience. AI Algorithm Development This phase involves developing and training AI models to analyze and simplify code, as well as testing these models on various code samples to ensure accuracy. Backend Development Setting up the server environment and database is essential, along with developing API endpoints for code submission, analysis, and retrieval. Frontend Development The user interface is developed based on the designs, implementing features for code submission, viewing simplified code, and displaying citations. Integration & Testing AI models are integrated with the backend, followed by thorough testing to ensure the application works as expected. User testing is also conducted to gather feedback. Deployment & Maintenance The application is deployed to a production environment, with continuous monitoring for any issues and regular maintenance and updates. User Flow Code Submission Users can submit their code through a user-friendly interface, allowing them to provide guided objectives for the AI to focus on. Objective Setting Users specify what they want the AI to focus on during the code analysis. Code Analysis The AI analyzes the code, restructures it, and ensures the output remains the same. Simplified Code Display Users can view the simplified code along with a narrative explaining the changes. Citation Display Citations for code sources are displayed alongside the simplified code. Potential Challenges Ensuring the AI can handle various coding languages and styles is a significant challenge, along with maintaining the accuracy and reliability of the AI's code simplification. Properly attributing sources and managing citations to avoid plagiarism is also crucial. Previous Next
- Convering Excel to CSV: Web Application | Akweidata
< Back Convering Excel to CSV: Web Application A basic Web application written in HTML and Javascript to convert excel files to CSV. Github: https://github.com/akweix/excel_to_csv Previous Next
- Proving the Butterfly Effect | Akweidata
< Back Proving the Butterfly Effect Within the context of metreology and physics, we can explore the butterfly effect Exploration took place between Feburary 2016 and March 2017. Report was finalized on the 23 March 2017. Introduction Football is an exciting game. However, being an Arsenal fan, football turns out to be an extremely unpredictable and painful affair at times. Arsenal FC is a North London team which plays in the English Premier League. On the 2nd of March 2016, Arsenal played a game against a relatively weaker side, Swansea. Most predictions favored Arsenal, but as usual, Arsenal are just full of surprises. They lost pathetically. Appalled by the results and Arsenal’s inconsistency, I started to abstractly wonder what I could have done to change the score. Is it possible that if I had simply worn a different shirt at home whilst watching the game (although I live in Berlin and the game was in the UK), the results could have been different? I brought up this topic with a friend of mine. He simply rendered such a claim to be absurd. Even I believed it was absurd. But what if? We argued “hypothetically” around the topic for a while, up until he started to support my argument as he remembered the title of Edward Lorenz’s paper about chaos theory; “Does the flap of a butterfly’s wings in Brazil set of a Tornado in Texas?” Edward Lorenz was a mathematician, meteorologist and Math professor at MIT. He is generally accredited with establishing Chaos Theory, specifically the Butterfly Effect. The Butterfly effect is a “branch” of Chaos theory which observes extreme sensitivity dependent upon initial conditions. So, with the introduction of Chaos Theory to aid my argument, it can be mathematically “proven” that Arsenal could have won if I had simply worn a different shirt! Certainly an absurd proposition. Nonetheless, the concept of the butterfly effect does have significant applications accross multiple fields, namely meteorology, economics , physics, biology and psychology. What is the Butterfly Effect? I have earlier been interchangeably using the terms Chaos Theory and the Butterfly Effect. However, in this exploration specifically viewing the Butterfly effect. The Butterfly effect is a branch of Chaos Theory in which sensitivity of a dynamic system is observed by changing initial conditions in a small amount. Like the flap of a butterfly’s wings in the atmosphere causing a tornado. In truth, and as Edward Lorenz said, such a statement is quite absurd. However, that does not make it impossible. Edward Lorenz discovered the Butterfly Effect by accident. He was observing convection currents and other atmospheric conditions. Consequently, he devised 3 differential equations and made his famous Strange Attractor (Figure 1) also known as Lorenz Attractor (this shall be discussed later on) which described his observations. He then decided to print out the solution of his differential equations (the numerical iterations of his Strange Attractor) that he made on his computer. During the printing time, Edward decided to get a cup of coffee. When he came back to collect his printed solutions he was shocked to find an entire set of different numerical solutions and thus a different Strange Attractor printed out from what he had on his computer screen. He quickly came to learn that his set of initial values were rounded up when he excuted the print. Typically, rounding up the values should not be an issue because such small changes are generally considered as insignificant. However he found out that an extremely small change in the initial values for the specific atmospheric conditions model being observed actually led to a completely different weather forecast. Figure 1 *Figure 1 from https://math.dartmouth.edu/archive/m53f07/public_html/ An attractor is simply a set of numerical values towards which a system tends to evolve for a wide variety of starting conditions of a dynamic system. In mathematics, a dynamic system is a system in which a function describes the time dependence of a point in a geometrical space. Thus the input of the function is time. Examples of a dynamic system include the mathematical models that describe the swinging of a clock pendulum, the flow of water in a pipe, etc. Abstractly, an attractor can be viewed as the trajectory of a moving marble in a bowl, where the center of the bowl is the point at which the system evolves about. But what exactly is the Strange Attractor? Well it is the solution to Lorenz’s three differential equations. This is later explained in my exploration. Due to the aesthetic shape of the attractor, the name Butterfly Effect was assigned to his discovery of extreme sensitivity in chaotic systems. But one attractor proves nothing about the butterfly effect. The butterfly effect is only proven when another attractor is made, but using slightly different initial values. Then the difference in distance between the two separate attractors are calculated with respect to time. By observing the graph of their distance differences, only then is the beauty of chaos and the butterfly effect proven. Lorenz equations were used to generate plots for the y variable. The initial conditions for x and z are kept the same but those for y are slightly changed. Such slight differences in the initial values gave rise to completely different solutions. Chaos must not be associated with disorder or randomness. What one must understand about chaos is that there is order in chaos. With respect to Edward Lorenz’s work on the Butterfly Effect and that of my research, the systems are deterministic, meaning that their future is fully determined by their initial conditions with no random elements involved. Furthermore, as defined by Edward Lorenz, Chaos: When the present determines the future, but the approximate present does not approximately determine the future . Chaos theory is a new field in abstract mathematics, hence many mathematicians and physicist have different views on the topic. However, in this investigation, I shall not be diving into the great abstract depths of Chaos Theory, hence my applications and explanations of Chaos Theory is supported by definitions and concepts which are generally agreed on by most respected academic institutions. Aim of Exploration The aim of this exploration is to prove the Butterfly Effect. I shall do this by mathematically observing chaotic systems. As earlier mentioned, the butterfly effect can be applied to meteorology, economics, physics, but also; biology, psychology and many more. In this exploration I shall be observing the fields of meteorology and physics. . In the field of meteorology, I shall vividly explain and prove the Butterfly effect just as Edward Lorenz did. In the field of physics, I have used an online simulator, to simulate a double pendulum experiment. I shall then explore its sensitive and chaotic nature. The other fields may be occasionally referred to, but I shall not be mathematically observing them. For example, the application of the Butterfly effect in psychology is more abstract than mathematical. Furthermore, more abstract and creative claims of the Butterfly effect, such as time travel (like the movie “Back to the Future”... or better yet, my experience with Arsenal), were extremely small changes in the past can completely alter the once known future are very interesting, but personally claims of mathematical applications in the chaos found in those fields appear as pseudoscience instead of genuine mathematical evidence. Application in Meteorology “Does the flap of a butterfly’s wings in Brazil set of a Tornado in Texas?” I shall now vividly go through the steps and procedures Edward Lorenz used to create his strange attractor. Whilst studying thermal variations in an air cell underneath a thunderhead, he came up with these three ordinary differential equations. An ordinary differential equation is a differential equation containing one or more functions of one independent variable and its derivatives Lorenz’s system of ODEs were; σ,ρ and β are positive parameters which represent physical characteristics of air flow. x corresponds to the amplitude of convective currents, y to the temperature change between rising and falling currents and z to the deviation of the temperature from the normal temperature in the cell. With these atmospheric variables (and more), a weather forecast can be made. For his attractor, the parameters of σ,ρ and β were 10, 28 and 8/3 respectively. Solving Differential equations In this research I shall be working with Ordinary Differential Equations (ODEs). In layman terms, an ODE refers to an equation in which one is not solving for a value or values for x and y but rather for the function f(x) itself by working with its derivatives and there is only one independent variable. If there is more than one independent variable, the differential equation is called a Partial Differential Equation (PDE), but such are not being discussed here. An example of an ODE is; In this example the solution is not unique as, intuitively one can solve for f(x) and find out that the equation satisfies e^(-3x) or e^x and an infinitely amount of other functions. As seen below f(x)= e^x is indeed a solution. Considering f^'' (x)= e^x and f^' (x)= e^x The solution exists as a set of functions. More information, is needed to find out the specific function being viewed. But most differential equations cannot be solved intuitively. Hence there are many other ways of finding the solution(s) of an ODE. Mainly by a system of integration, Euler’s Method, calculated guesses, vector fields or numerical integration . I shall be using Numerical Integration. This method approximates the values for solutions of differential equations, hence, recovers the original function. Numerical Integration is done by using numerical programs. I am using an ODE solver from the program Octave. Numerical integration is the method Octave uses to solve ODEs. I shall now explain how numerical integration solves Lorenz’s differential equations Above is the general rule of integration. However, this rule is ironically not used in numerical integration. Below is c(t) the solution that I shall be trying to find. I am working in 3D plane hence points have the coordinates x,y,z. Furthermore, with Lorenz’s system of ODEs (equations (1), (2) and (3)), we know what c'(t) is Furthermore, Now using the first ODE, I shall reveal how the approximations are done Now, the vital assumption or better said approximation taken during numerical integration is that t_i+h=t_(i+1). Furthermore, as I am solving for x(t_(i+1) ), I shall multiply both sides by h, And eventually by rearranging the equation I get: As you can see from the expression above, in order to find an x component (also for y and z components) one must know what the previous value was. We cannot find t_(i+1) if we do not know t_i. Thus, this series of approximations relies heavily on what the initial values are. So, from Lorenz’s work, I know that the initial values for x,y,z are respectively are 0, 0.0001 and 0 (he arbitrarily used these). As every other value technically relies on the initial value, I would numerically (instead of algebraically as above) show how is found by using Using the expression above, Just as a reminder the parameters are 10, 28 and respectively. And is simply the initial value of the given component. h is simply an extremely small value (0.000001) Just as I have solved for x(t_1) and I can also find the y and z components of c(t_1) and all other successive solutions. From c(t_1), I can find c(t_2), then c(t_3)…and so on. This is what is done by Octave. These numerical solutions are eventually graphed and the Strange Attractor is made. (Figure 2) Figure 2 But creating one attractor does not prove anything. Another attractor must be created, with the same parameters, except; the initial value must have an extremely slight change from the other attractor. Using Octave, (a graphing software) I found the solution to Lorenz differential equations shown in Figure 2. However I need to explain some of these computations I made. I created a trajectory that runs from 0 to 100 seconds and between these times I specified for 1000 points. The initial values I used for x,y,z are respectively are 0, 0.0001 and 0 respectively. Just as Lorenz did I would create another attractor using a slightly different y initial value. Only the initial y value is being changed. One should be expecting a very little change or at most a slight shift in every point in the y direction by just that amount. But that is not the case whatsoever. In figure 2 I used a y value of 0.0001, but for the second attractor (figure 3) I have changed it to 0.001. Due to the quality of my screenshots and the nature of strange attractors one may not see any difference between figure 2 and figure 3. But there is a big difference. Figure 3 Now I shall graph the difference between the two attractors. As both attractors are sets of numerical values with respect to time, I can find the distance between the points on the two different attractors at the same time. Hence I shall be graphing time against change in distance. Every iteration can be seen as a point x,y,z and furthermore a vector all with respect to time. I shall once again use Octave to find the differences between the two attractors. Nonetheless, I shall explain how it is done my Octave. One must visualize both attractors existing on the same graph. Every point is defined as a vector with respect to time. Thus, I am simply using the same input value t on both attractors and finding their resultant vector. Now, I shall find the magnitude of that resultant vector, which would be the distance between the two points. So arbitrarily I shall refer to the first attractor as A and the second as B. So for every iteration, this is done to find the change in distance. Below is the graph of time against change in distance for my 10000 iterations. Figure 4 This unorthodox and unforeseen differences in distance is what proves that a system is sensitive as a small change in the initial values leads to a very different solution or in Lorenz’s case, an entirely different weather forecast. This proves the butterfly effect. Application in Physics “Can the drilling of oil in Ghana cause an earthquake in Italy?” As you can see I have also decided to propose my own absurd question to open up the Butterfly Effect’s application to the field of physics. Using an online simulator, I have decided to mathematically observe the chaotic nature of a double pendulum set up, with regard to small changes in the initial conditions. This online simulator is from the website, http://www.tapdancinggoats.com . Although the name of the website is quite…interesting, the double pendulum simulator on the site is actually sublime. This simulator was implemented in HTML5. A double pendulum setup is simply two pendulums attached end to end. As this system is chaotic, a set of ODE’s can be used to determine its motion. That’s what I will be attempting to do. A screenshot of the simulator can be seen below: Figure 5 As seen in figure 5, the conditions mass, initial angles, initial angular velocities (ω) and length of strings can all be controlled. The motion of this simulation is restricted to 2 dimensions only. Before formulating the differential equations, I would illustrate the sensitivity of a double pendulum experiment by viewing its trajectories. I shall keep all variables constant except the initial angle 〖 θ〗_2 which is visually illustrated in Figure 6. Figure 6 Below are two trajectories I produced with two different θ2 values. The initial values for θ2 are 90 and 91 degrees respectively. With 1 degree being their difference. I allowed both simulations to run for 15 seconds and then I took a screenshot of their trajectories. Below are my observations: The orange circles represent angular velocities (ω). Both initial velocities were set at 1 degree per second. Both point masses m_(1 ) and m_2 in both simulations are 1kg each. l_1 and l_2 are 20 cm each, in the two simulations. A small change of 1 degree has caused a huge difference in the trajectories and angular velocities. This system is sensitive, which is a characteristic of a chaotic system. I am quite shocked (considering I also made the angular velocity just 1 degree per second) with the large difference created by literally one small change in the initial conditions. Now I shall start formulating the differential equations which describe the double pendulum system. So as illustrated in Figure 6, I was working with the two point masses m_(1 ) and m_2. These are attached to l_1 and l_2 respectively. These strings/wires are assumed to be massless for experimentation sake. Furthermore, the angles made with the vertical are denoted by 〖 θ〗_1 and 〖 θ〗_2 .The force of gravity is denoted with g. With respect to a Cartesian plane, the x position of the bobs (the masses on the pendulum) reveals where it is horizontally. And that of the y position reveals where the bobs are vertically. As I already mentioned, the motion of the pendulum was restricted to 2 dimensions only. The subscripts 1 and 2 represents the first and second bobs respectively. Positions of the bobs are given by These formulas come about from visualizing the position of the bobs as points on a Cartesian plane, which change depending on the angles θ_1 and〖 θ〗_2. Now to work out the potential energy (PE) in the system: Note: Formulas for PE and KE are general formulas from Physics. Hence I shall simply substitute equations (4) and (6). However, I shall start to denote PE, with the letter V. I am doing this in order to easily express the function as a Lagrangian. A Lagrangian is a function of the generalized coordinates containing information about the dynamics of the system. A Lagrangian function summarizes the dynamics of an entire system. Instead of using forces, a Lagrangian uses the energies in the system , in this case PE and KE. Technically, Newtonian mechanics can be used, but as I am working closely with trajectories with generalized coordinates (Cartesian coordinate system), Lagrangian mechanics would be more suitable. Hence, Now to work out kinetic energy (KE) in the system: Once again, I would refer to KE differently for the sake of a Lagrangian expression. KE = T. However before moving on, I must acknowledge the new variable in the formula. Velocity v . Velocity is simply the derivative of displacement. Thus v= ds/dt with s being the function of position. Therefore, I need to find the derivatives for all the position functions listed above. After finding the derivatives, I am now a step closer to finding the functions for velocity. I need to use the derivatives for the horizontal and vertical position functions because v=x^'+y' (where v is velocity.) Hence (x_1' + y_1') and (x_2' + y_2') represent v_1 and v_2 respectively. Hence I shall substitute equations (7), (8), (9) and (10) to find KE (T) of the system; Note: The T represents KE and NOT total energy. The Lagrangian of a system is defined to be the difference between the kinetic energy and potential energy : L=T-V For L to be true, the Euler-Lagrange differential equation (a fundamental equation of calculus variations) must meet this condition: The Euler-Lagrange differential equation is a second-order partial differential equation. Unlike the ODEs examined earlier, partial differential equations (PDEs) contain multivariable functions and their partial derivatives. A partial derivative is a derivative of a function of two or more variables with respect to one variable as the other is treated as a constant. For instance The symbol ∂ “del” is used to distinguish partial derivatives from ordinary derivatives. In my Lagrangian θ_1 and θ_2 are my variables. Thus partials for the Lagrangian θ_1 Now I shall substitute these into the Euler-Lagrangian Equation Now I would make (θ_1 )^'' the subject because this would eventually enable me to create two dependent differential equations. (12) Similarly I shall solve for the partials of θ_2 Thus partials for the Lagrangian θ_2 Now I shall substitute these into the Euler-Lagrangian Equation Now after simplifying I would make (θ_2 )^'' the subject. (13) These second-order PDEs (12) and (13) can be solved numerically using Octave. This is illustrated below in Figure 9 for only〖 θ〗_2 (I only need one angle to prove my point). It shows the changes in the angle with respect to time in the system for particular initial values. Due to its complicated motion (illustrated below) a different set of initial values even with a highly small difference would alter the course of the systems dynamics because it is chaotic, hence sensitive to initial values. And Figure 10 below shows the two angles with respect to time. Interestingly an attractor is formed. Figure 9 One can observe the chaotic, yet sublime “order” of a double pendulum experiment. The butterfly effect has been proven in the field of physics. With this knowledge in mind, I have started to wonder how precise and accurate one must be when working with machines that apply the motion of a double pendulum. Figure 10 Conclusion It has been fascinating to learn about the “small” things in life. By proving the existence of the Butterfly Effect in multiple fields, I can now clearly understand the old phrase “It’s the little things in life that matter.” It is quite interesting to know that one air molecule can make the difference between a sunny, azure sky day and a rainy lightning storm! The Butterfly Effect has to be one of the most advanced and most extraordinary theory discovered in the mathematical world. The sublime order in chaos has to be the greatest irony I have come across. From this exploration I have learned a lot about graphing software and the large role programs play in approximations and models. This theory however has got me thinking. How could other fields apply this theory? Then one area came across my mind: Finance . What if they are just mistaking chaotic for randomness? Previous Next