{"id":20031742,"url":"https://github.com/astrodynamic/algorithmtrading--interpolation-approximation--in-qt-cpp","last_synced_at":"2025-03-02T05:24:42.700Z","repository":{"id":162971635,"uuid":"638219062","full_name":"Astrodynamic/AlgorithmTrading--Interpolation-Approximation--in-Qt-CPP","owner":"Astrodynamic","description":"The AlgorithmTrading project is a C++ program for plotting tabulated functions of stock quotes using interpolation methods. It includes a GUI implementation based on any GUI library with API for C++ and the ability to load data from a CSV file. The Cubic Spline interpolation method is implemented, and the user can specify the number of points.","archived":false,"fork":false,"pushed_at":"2023-05-09T10:37:39.000Z","size":23285,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"develop","last_synced_at":"2025-01-12T18:09:37.593Z","etag":null,"topics":["approximation","clang-format","cmake","cpp","cpp17","cppcheck","cubic-splines","cvs","google-style","interpolation","makefile","neu","newton-interpolation","qt","qt-widgets","qtcharts"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Astrodynamic.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-05-09T10:28:55.000Z","updated_at":"2024-06-21T09:55:00.000Z","dependencies_parsed_at":null,"dependency_job_id":"8b9b0500-06af-4525-bc14-84eef430db28","html_url":"https://github.com/Astrodynamic/AlgorithmTrading--Interpolation-Approximation--in-Qt-CPP","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Astrodynamic%2FAlgorithmTrading--Interpolation-Approximation--in-Qt-CPP","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Astrodynamic%2FAlgorithmTrading--Interpolation-Approximation--in-Qt-CPP/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Astrodynamic%2FAlgorithmTrading--Interpolation-Approximation--in-Qt-CPP/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Astrodynamic%2FAlgorithmTrading--Interpolation-Approximation--in-Qt-CPP/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Astrodynamic","download_url":"https://codeload.github.com/Astrodynamic/AlgorithmTrading--Interpolation-Approximation--in-Qt-CPP/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241462614,"owners_count":19966895,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["approximation","clang-format","cmake","cpp","cpp17","cppcheck","cubic-splines","cvs","google-style","interpolation","makefile","neu","newton-interpolation","qt","qt-widgets","qtcharts"],"created_at":"2024-11-13T09:34:34.329Z","updated_at":"2025-03-02T05:24:42.669Z","avatar_url":"https://github.com/Astrodynamic.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AlgorithmTrading in Qt/CPP\nThis is a C++ program for plotting tabulated functions of stock quotes using interpolation and approximation methods. It allows you to load data from a .csv file, plot the data using the cubic spline interpolation method, and approximate the data using the least squares method with a polynomial of a chosen degree.\n\n![Overwiew](data/img/overview.gif)\n\n## Dependencies\n\n- C++17\n- QT5 or QT6 (Widgets, LinguistTools, Charts, Concurrent, Core)\n\n## Installation\n\n1. Clone the repository:\n\n```\ngit clone https://github.com/your_username/AlgorithmTrading.git\n```\n\n2. Install dependencies:\n\n   * On Ubuntu:\n\n   ```\n   sudo apt-get install build-essential qt5-default cmake\n   ```\n\n   * On MacOS:\n\n   ```\n   brew install qt cmake\n   ```\n\n3. Build the program:\n\n   ```\n   cd AlgorithmTrading\n   cmake -S ./ -B ./build\n   cmake --build ./build\n   ```\n\n4. Run the program:\n\n   ```\n   cd ./build\n   ./AlgorithmTrading\n   ```\n\n## Usage\n\n### Opening a file in the app\n\nTo start working, you need to open a file by clicking on the `Open` button in one of the three tabs of the application. The file must be in `.csv` format and contain columns with the following data:\n\n- Date (format: `yyyy-MM-dd`, required)\n- Function value (format: `double`, required)\n- Weight (format: `double`, optional)\n\nExamples of input data:\n\n```\nDate,Close\n2021-03-22,123.389999\n2021-03-23,122.540001\n2021-03-24,120.089996\n...\n```\n\n```\nDate,Close,Weight\n2021-03-22,12.85,1.22387\n2021-03-23,12.21,0.851246\n2021-03-24,12.14,0.80462\n...\n```\n\n### Cubic Spline Interpolation\n\n1. Load data from a .csv file using the \"Load\" button.\n2. Enter the number of points you want to plot in the \"Number of points\" field.\n3. Click on the \"Plot\" button to plot the data using the cubic spline interpolation method.\n4. To clear the plot, click on the \"Clear\" button.\n\n*Interpolation* is a method of finding intermediate values of a quantity from a discrete set of known values.\n\n`Newton interpolation polynomial (with the ability to select the degree of the polynomial)` and `Cubic spline interpolation` are two implemented interpolation methods in the project.\n\nThe user can place up to five graphs in the graph area at the same time.\n\nMoving around the graph area is implemented by holding down the right mouse button. If you need to return to the initial state, you should double-click the left mouse button.\n\nClearing can be done by pressing the `Clear all` button (delete all graphs), or by clicking on the `Remove` field in the list of graphs and deleting the required one.\n\nThe user can also get the values of the two methods by clicking on the `Value from date` button and selecting the desired date.\n\n![Interpolation](data/img/interpolation.gif)\n\n### Least Squares Approximation\n\n1. Load data from a .csv file using the \"Load\" button.\n2. Enter the number of points you want to plot in the \"Number of points\" field.\n3. Enter the degree of the polynomial you want to use for the approximation in the \"Degree\" field.\n4. Enter the number of days you want to extend the graph in the \"Number of days\" field.\n5. Click on the \"Approximate\" button to plot the data using the least squares method with a polynomial of the chosen degree.\n6. To clear the plot, click on the \"Clear\" button.\n\n*Approximation* is the replacement of one mathematical object with others that are in some sense close to the original ones.\n\n`Method of least squares (with the ability to select the degree of the polynomial)` - implemented approximation method in the project.\n\nThe user can place up to five graphs in the graph area at the same time.\n\nThe user can set the value `M`, which means how many additional days the data will be approximated for.\n\nThe user can also get the values of two methods by clicking on the `Value from date` button and selecting the desired date.\n\nIt is possible to use weights of points, which can be set in the input `.csv` file. To do this, you need to set the `use users weights` checkbox to the enabled position.\n\nAdded the ability to simultaneously build the following 4 graphs:\n- With a polynomial degree of 1 for a table where the weights are set by the user\n- With a polynomial degree of 2 for a table where the weights are set by the user\n- With a polynomial degree of 1 for a table where all weights are equal to 1\n- With a polynomial degree of 2 for a table where all weights are equal to 1\n\n![Approximation](data/img/approximation.gif)\n\n## Research\n\nResearch on the temporal characteristics of interpolation using `cubic splines` and `Newton's polynomial` depending on the calculated points.\n\nThe user sets the maximum number of points `k` and the number of partitions `h`. The minimum value of `k` is the number of entries in the input table. The measurements are repeated `h` times, each performed 10 times, and the arithmetic mean will be calculated.\n\n![Research](data/img/research.gif)\n\n### Output Values\n\nTo output the values of the stock quotes function obtained by interpolation or approximation method according to a user-defined argument value (date and time), enter the value in the \"Output Value\" field and click on the \"Output\" button.\n\n## License\n\nThis project is licensed under the [MIT License](LICENSE). See the LICENSE file for more details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fastrodynamic%2Falgorithmtrading--interpolation-approximation--in-qt-cpp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fastrodynamic%2Falgorithmtrading--interpolation-approximation--in-qt-cpp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fastrodynamic%2Falgorithmtrading--interpolation-approximation--in-qt-cpp/lists"}