├── .gitignore ├── README.md ├── babel.config.js ├── jsconfig.json ├── package-lock.json ├── package.json ├── public ├── favicon.ico └── index.html ├── src ├── App.vue ├── assets │ └── logo.png ├── components │ └── CodingChallenge.vue └── main.js └── vue.config.js /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /dist 4 | 5 | 6 | # local env files 7 | .env.local 8 | .env.*.local 9 | 10 | # Log files 11 | npm-debug.log* 12 | yarn-debug.log* 13 | yarn-error.log* 14 | pnpm-debug.log* 15 | 16 | # Editor directories and files 17 | .idea 18 | .vscode 19 | *.suo 20 | *.ntvs* 21 | *.njsproj 22 | *.sln 23 | *.sw? 24 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Vue project that implemements options strategy risk and reward analysis. 2 | ## Table of Contents 3 | -#installation 4 | -#usage 5 | ##Installation 6 | To install this project, follow these steps: 7 | 1. Clone the repository. 8 | 2. Navigate to the project directory. 9 | 3. Install dependencies with `npm install` and Chart.js (npm install chart.js). 10 | 11 | ## Usage 12 | Here are some examples of how to use this project: 13 | 1. Run: Start your Vue application (npm run serve if using Vue CLI). 14 | 2. Interaction: Input details for each options contract (strike price, type, bid, ask), click "Generate Chart" to see the risk & reward graph, and view the max profit, max loss, and break-even points. 15 | 16 | -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [ 3 | '@vue/cli-plugin-babel/preset' 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /jsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es5", 4 | "module": "esnext", 5 | "baseUrl": "./", 6 | "moduleResolution": "node", 7 | "paths": { 8 | "@/*": [ 9 | "src/*" 10 | ] 11 | }, 12 | "lib": [ 13 | "esnext", 14 | "dom", 15 | "dom.iterable", 16 | "scripthost" 17 | ] 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vue-challenge", 3 | "version": "0.1.0", 4 | "private": true, 5 | "scripts": { 6 | "serve": "vue-cli-service serve", 7 | "build": "vue-cli-service build", 8 | "lint": "vue-cli-service lint" 9 | }, 10 | "dependencies": { 11 | "chart.js": "^4.4.3", 12 | "core-js": "^3.8.3", 13 | "vue": "^2.6.14" 14 | }, 15 | "devDependencies": { 16 | "@babel/core": "^7.12.16", 17 | "@babel/eslint-parser": "^7.12.16", 18 | "@vue/cli-plugin-babel": "~5.0.0", 19 | "@vue/cli-plugin-eslint": "~5.0.0", 20 | "@vue/cli-service": "~5.0.0", 21 | "eslint": "^7.32.0", 22 | "eslint-plugin-vue": "^8.0.3", 23 | "vue-template-compiler": "^2.6.14" 24 | }, 25 | "eslintConfig": { 26 | "root": true, 27 | "env": { 28 | "node": true 29 | }, 30 | "extends": [ 31 | "plugin:vue/essential", 32 | "eslint:recommended" 33 | ], 34 | "parserOptions": { 35 | "parser": "@babel/eslint-parser" 36 | }, 37 | "rules": {} 38 | }, 39 | "browserslist": [ 40 | "> 1%", 41 | "last 2 versions", 42 | "not dead" 43 | ] 44 | } 45 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cook-blacklegsanji/aries-vue-challenge/03bf952ed2a6820b109ef84f8d2c7b950bb425d0/public/favicon.ico -------------------------------------------------------------------------------- /public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | 7 | 8 |Max Profit: {{ maxProfit.toFixed(2) }}
40 |Max Loss: {{ maxLoss.toFixed(2) }}
41 |Break-Even Points: {{ breakEvenPoints.join(', ') }}
42 |