diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 517f6f04be2..4dd27c59787 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -94,7 +94,7 @@ jobs: - name: Lint Code Base uses: docker://avtodev/markdown-lint:v1 with: - args: "./gamestonk_terminal/options/README.md ./*.md ./changelogs/*.md ./gamestonk_terminal/common/**/*.md ./gamestonk_terminal/cryptocurrency/**/*.md" + args: "./*.md ./changelogs/*.md ./gamestonk_terminal/**/*.md" tests-python: name: Vanilla Python Tests - (${{ matrix.python-version }}, ${{ matrix.os }}) needs: test diff --git a/.markdownlintrc b/.markdownlintrc index e1645bcd26f..1e560aadb62 100644 --- a/.markdownlintrc +++ b/.markdownlintrc @@ -3,7 +3,8 @@ "MD025": false, "MD013": { "line_length": 120, - "tables": false + "tables": false, + "code_blocks": false }, "MD033": false, "MD036": false, diff --git a/gamestonk_terminal/README.md b/gamestonk_terminal/README.md index 9508decbe99..15cbcac1374 100644 --- a/gamestonk_terminal/README.md +++ b/gamestonk_terminal/README.md @@ -1,6 +1,6 @@ # Features ๐Ÿ“ˆ -### Table of contents +## Table of contents * [Discover Stocks](#Discover-Stocks-) * [Behavioural Analysis](#Behavioural-Analysis-) @@ -30,11 +30,12 @@ The main menu allows the following commands: -``` +```text usage: load [-t S_TICKER] [-s S_START_DATE] [-i {1,5,15,30,60}] [--source {yf,av,iex}] [-p] ``` -* Load stock ticker to perform analysis on. When the data source is 'yf', an Indian ticker can be loaded by using '.NS' at the end, e.g. 'SBIN.NS'. See available market in . +* Load stock ticker to perform analysis on. When the data source is 'yf', an Indian ticker can be loaded by using '.NS' + at the end, e.g. 'SBIN.NS'. See available market in . * -t : Stock ticker * -s : The starting date (format YYYY-MM-DD) of the stock * -i : Intraday stock minutes @@ -43,29 +44,28 @@ usage: load [-t S_TICKER] [-s S_START_DATE] [-i {1,5,15,30,60}] [--source {yf,av **Note:** Until a ticker is loaded, the menu will only show *disc* and *sen* menu, as the others require a ticker being provided. -``` +```text usage: clear ``` * Clear previously loaded stock ticker. -``` +```text view ``` -* Visualise historical data of a stock. +* Visualize historical data of a stock. ![AAPL](https://user-images.githubusercontent.com/18151143/125211301-69424800-e273-11eb-853d-0b7a0db8ffb7.png) - Line plot color is configurable in config_plot.py -``` +```text quote -t S_TICKER ``` * Show the current price of a stock. -``` +```text candle -s START_DATE ``` @@ -73,7 +73,7 @@ candle -s START_DATE ![nio](https://user-images.githubusercontent.com/25267873/111053397-4d609e00-845b-11eb-9c94-89b8892a8e81.png) -``` +```text export -f GNUS_data -F csv ``` @@ -413,7 +413,6 @@ Command|Description|Source `gl_bonds` | Global bonds overview | `currencies` | Global currencies overview | -   ## Options [ยป](options/README.md) @@ -527,8 +526,8 @@ Command|Website   - ## Government [ยป](government/README.md) + Command|Website ----|---- `last_congress` | last congress trading @@ -555,6 +554,7 @@ with ticker provided |   ## ETF [ยป](etf/README.md) + command|description ---|---- `web`|open webbroswer to stockanalysis.com diff --git a/gamestonk_terminal/economy/README.md b/gamestonk_terminal/economy/README.md index 45cb34d29f7..7ae4dabd51b 100644 --- a/gamestonk_terminal/economy/README.md +++ b/gamestonk_terminal/economy/README.md @@ -3,35 +3,36 @@ This menu aims to assess economy data, and the usage of the following commands along with an example will be exploited below. * [feargreed](#feargreed) - * CNN Fear Greed Index from https://money.cnn.com/data/fear-and-greed/ + * CNN Fear Greed Index from * [events](#events) - * economic impact events [Finnhub] + * economic impact events [Finnhub] * [fred](#fred) - * display customized FRED from https://fred.stlouisfed.org + * display customized FRED from * [vixcls](#vixcls) - * Volatility Index + * Volatility Index * [gdp](#gdp) - * Gross Domestic Product + * Gross Domestic Product * [unrate](#unrate) - * Unemployment Rate + * Unemployment Rate * [dgs1](#dgs1) - * 1-Year Treasury Constant Maturity Rate + * 1-Year Treasury Constant Maturity Rate * [dgs5](#dgs5) - * 5-Year Treasury Constant Maturity Rate + * 5-Year Treasury Constant Maturity Rate * [dgs10](#dgs10) - * 10-Year Treasury Constant Maturity Rate + * 10-Year Treasury Constant Maturity Rate * [dgs30](#dgs30) - * 30-Year Treasury Constant Maturity Rate + * 30-Year Treasury Constant Maturity Rate * [mortgage30us](#mortgage30us) - * 30-Year Fixed Rate Mortgage Average + * 30-Year Fixed Rate Mortgage Average * [fedfunds](#fedfunds) - * Effective Federal Funds Rate + * Effective Federal Funds Rate * [aaa](#aaa) - * Moody's Seasoned AAA Corporate Bond Yield + * Moody's Seasoned AAA Corporate Bond Yield * [dexcaus](#dexcaus) - * Canada / U.S. Foreign Exchange Rate (CAD per 1 USD) + * Canada / U.S. Foreign Exchange Rate (CAD per 1 USD) [WSJ](#wsj) + * [overview](#overview) * Get market overview * [indices](#indices) @@ -45,26 +46,28 @@ This menu aims to assess economy data, and the usage of the following commands a * [currencies](#currencies) * Get global currency overview - ## feargreed + ```text usage: feargreed [-i {jbd,mv,pco,mm,sps,spb,shd,index}] ``` -Display CNN Fear And Greed Index from https://money.cnn.com/data/fear-and-greed/. -* -i : CNN Fear And Greed indicator or index. From Junk Bond Demand, Market Volatility, Put and Call Options, Market Momentum Stock Price, Strength, Stock Price Breadth, Safe Heaven Demand, and Index. Default: None, shows all. +Display CNN Fear And Greed Index from . + +* -i : CNN Fear And Greed indicator or index. From Junk Bond Demand, Market Volatility, Put and Call Options, Market + Momentum Stock Price, Strength, Stock Price Breadth, Safe Heaven Demand, and Index. Default: None, shows all. ![feargreed](https://user-images.githubusercontent.com/25267873/122684285-7338d400-d1fc-11eb-8702-d409d96a2672.png) Captura de ecrรฃ 2021-06-20, ร s 19 18 12 - ## events + ```text usage: events [-c {NZ,AU,ERL,CA,EU,US,JP,CN,GB,CH}] [-i {low,medium,high,all}] [-n NUM] ``` -Output economy impact calendar impact events. [Source: https://finnhub.io] +Output economy impact calendar impact events. [Source: ] * -c : Country from where to get economy calendar impact events, between NZ,AU,ERL,CA,EU,US,JP,CN,GB,CH. Default: US. * -i : Impact of the economy event, between low,medium,high,all. Default: all. @@ -72,15 +75,16 @@ Output economy impact calendar impact events. [Source: https://finnhub.io] Captura de ecrรฃ 2021-05-02, ร s 19 51 47 - ## fred + ```text usage: fred [-i SERIES_ID] [-s START_DATE] [-t] ``` -Display customized Federal Reserve Economic Data (FRED) from https://fred.stlouisfed.org. It is possible to display multiple series. +Display customized Federal Reserve Economic Data (FRED) from . It is possible to display +multiple series. -* -i : FRED Series ID from https://fred.stlouisfed.org. For multiple series use: `fred series1,series2,series3` +* -i : FRED Series ID from . For multiple series use: `fred series1,series2,series3` * -s : Starting date (YYYY-MM-DD) of data. Default: 2019-01-01. * -t : Only output text data. @@ -88,9 +92,8 @@ Example: `fred gdp,t10yie,cpiaucsl` ![fred_series](https://user-images.githubusercontent.com/25267873/127773594-2518ddfd-eae2-4f41-a963-356214c71e8c.png) - - ## vixcls + ```text usage: vixcls [-s START_DATE] [-t] ``` @@ -102,8 +105,8 @@ Volatility Index ![vixcls](https://user-images.githubusercontent.com/25267873/116769167-160d7700-aa32-11eb-8874-3b864908c9c2.png) - ## gdp + ```text usage: gdp [-s START_DATE] [-t] ``` @@ -115,8 +118,8 @@ Gross Domestic Product ![gdp](https://user-images.githubusercontent.com/25267873/116769162-14dc4a00-aa32-11eb-886a-b5368146ed37.png) - ## unrate + ```text usage: unrate [-s START_DATE] [-t] ``` @@ -128,8 +131,8 @@ Unemployment Rate ![unrate](https://user-images.githubusercontent.com/25267873/116769161-14dc4a00-aa32-11eb-91f3-a0f80d687a12.png) - ## dgs1 + ```text usage: dgs1 [-s START_DATE] [-t] ``` @@ -141,8 +144,8 @@ usage: dgs1 [-s START_DATE] [-t] ![dgs1](https://user-images.githubusercontent.com/25267873/116769166-160d7700-aa32-11eb-9247-78156af4d527.png) - ## dgs5 + ```text usage: dgs5 [-s START_DATE] [-t] ``` @@ -154,8 +157,8 @@ usage: dgs5 [-s START_DATE] [-t] ![dgs5](https://user-images.githubusercontent.com/25267873/116769165-1574e080-aa32-11eb-96ee-c57728d8f57c.png) - ## dgs10 + ```text usage: dgs10 [-s START_DATE] [-t] ``` @@ -167,8 +170,8 @@ usage: dgs10 [-s START_DATE] [-t] ![dgs10](https://user-images.githubusercontent.com/25267873/116769164-1574e080-aa32-11eb-93a0-3b8a2b7cb3d2.png) - ## dgs30 + ```text usage: dgs30 [-s START_DATE] [-t] ``` @@ -180,8 +183,8 @@ usage: dgs30 [-s START_DATE] [-t] ![dgs30](https://user-images.githubusercontent.com/25267873/116769159-13ab1d00-aa32-11eb-8c3d-e53c8d1f1a19.png) - ## mortgage30us + ```text usage: mortgage30us [-s START_DATE] [-t] ``` @@ -193,8 +196,8 @@ usage: mortgage30us [-s START_DATE] [-t] ![mortgage30us](https://user-images.githubusercontent.com/25267873/116769157-13128680-aa32-11eb-8826-ccb2e6ae764e.png) - ## fedfunds + ```text usage: fedfunds [-s START_DATE] [-t] ``` @@ -206,8 +209,8 @@ Effective Federal Funds Rate ![fedfunds](https://user-images.githubusercontent.com/25267873/116769158-13ab1d00-aa32-11eb-9dc2-8296bc4f7e2c.png) - ## aaa + ```text usage: aaa [-s START_DATE] [-t] ``` @@ -219,8 +222,8 @@ Moody's Seasoned AAA Corporate Bond Yield ![aaa](https://user-images.githubusercontent.com/25267873/116769160-1443b380-aa32-11eb-84a8-036e15b47c9b.png) - ## dexcaus + ```text usage: dexcaus [-s START_DATE] [-t] ``` @@ -233,57 +236,65 @@ Canada / U.S. Foreign Exchange Rate (CAD per 1 USD) ![dexcaus](https://user-images.githubusercontent.com/25267873/116769155-10b02c80-aa32-11eb-8ece-d8e92b8df1af.png) # WSJ + The following functions are meant to take the information from the [WSJ Market Data Page](https://www.wsj.com/market-data) ## overview + ```python usage: overview ``` + Market overview overview - ## indices + ```python usage: indices ``` + US indices overview indices - ## futures + ```python usage: futures ``` + Top futures/commodities overview futures - ## us_bonds + ```python usage: us_bonds ``` + US bonds overview us_bonds - ## gl_bonds + ```python usage: gl_bonds ``` + Global bonds overview gl_bonds - ## currencies + ```python usage: currencies ``` + Global currencies overview currencies diff --git a/gamestonk_terminal/etf/README.md b/gamestonk_terminal/etf/README.md index 2aace91d88f..2ec8716a4ec 100644 --- a/gamestonk_terminal/etf/README.md +++ b/gamestonk_terminal/etf/README.md @@ -1,4 +1,5 @@ # ETF + Menu for Exchange Traded Funds. Data is currently scraped from StockAnalysis.com/etf @@ -6,7 +7,7 @@ Data is currently scraped from StockAnalysis.com/etf * [search](#search) * search for ETFs matching an input * [overview](#overview) - * get ETF overview + * get ETF overview * [holdings](#holdings) * show ETF holdings * [compare](#compare) @@ -15,6 +16,7 @@ Data is currently scraped from StockAnalysis.com/etf * screen ETFs [WSJ](#WSJ) + * [gainers](#gainers) * show top gainers * [decliners](#decliners) @@ -23,20 +25,26 @@ Data is currently scraped from StockAnalysis.com/etf * show most active ## web + ```python usage: web ``` -Opens StockAnalysis.com/etf. This site shows all avalaiable ETFs (currently > 2800). + +Opens StockAnalysis.com/etf. This site shows all available ETFs (currently > 2800). ## search + ```python usage: search [-e --etf] [--export {csv,json,xlsx}] ``` + Search for ETFs matching + * -e/--etf : Name to search for. Can be a company or other search term * --export {csv,json,xlsx} : Export to the selected file Example Usage: Search for all ETFs that deal with AI + ```python (โœจ) (etf)> search artificial intelligence BOTZ - Global X Robotics & Artificial Intelligence ETF @@ -45,23 +53,29 @@ ROBT - First Trust Nasdaq Artificial Intelligence and Robotics ETF THNQ - ROBO Global Artificial Intelligence ETF UBOT - Daily Robotics, Artificial Intelligence & Automation Index Bull 3X Shares ``` + Note that this searches for exact strings in the ETF name. Searching for SPY will return nothing. ## overview + ```python usage: overview [-e --etf] [--export {csv,json,xlsx}] ``` + * -e/--etf : ETF to get data for * --export {csv,json,xlsx} : Export to the selected file -Returns the overview of the ETF. Shows Last Price, Assets, Net Asset Value (NAV), Expense Ratio, PE Ratio, 5Year Beta, Total Dividend and Dividend Yield. +Returns the overview of the ETF. Shows Last Price, Assets, Net Asset Value (NAV), Expense Ratio, PE Ratio, 5Year Beta, +Total Dividend and Dividend Yield. Example will be a single column from the [compare](#compare) example. ## holdings + ```python usage: overview [-e --etf] [-l --limit] [--export {csv,json,xlsx}] ``` + * -e/--etf : Name of ETF to get data for. * -l/--limit : Number of assets to show. Max 200. Defaults to 20. * --export {csv,json,xlsx} : Export to the selected file @@ -69,7 +83,8 @@ usage: overview [-e --etf] [-l --limit] [--export {csv,json,xlsx}] Returns the top holdings in the ETF. Shows percentage and total shares held. Example: -``` + +```text (โœจ) (etf)> holdings spy -l 5 โ•’โ•โ•โ•โ•โ•คโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•คโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•คโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•• โ”‚ โ”‚ Ticker โ”‚ % of ETF โ”‚ Shares โ”‚ @@ -87,17 +102,19 @@ Example: ``` ## compare + ```python usage: compare [-e --etfs] [--export {csv,json,xlsx}] ``` + * -e/--etfs : ETFs to compare. Input as comma separated (ETF1,ETF2,..) * --export {csv,json,xlsx} : Export to the selected file -Campares the overview of different ETFs. +Compares the overview of different ETFs. Example: -``` +```text (โœจ) (etf)> compare spy,qqq,voo,doge DOGE not found โ•’โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•คโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•คโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•คโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•• @@ -120,7 +137,9 @@ DOGE not found โ”‚ Dividend Yield โ”‚ 1.34% โ”‚ 0.54% โ”‚ 1.41% โ”‚ โ•˜โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•งโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•งโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•งโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•› ``` + ## screener + ````python usage: screener [-n --num] [--export {csv,json,xlsx}] [-h] ```` @@ -129,11 +148,13 @@ usage: screener [-n --num] [--export {csv,json,xlsx}] [-h] * --export {csv,json,xlsx} : Export to the selected file Screen ETFs based on the overview data from stockanalysis.com. This data is scraped hourly during market hours. -Repo can be found at https://github.com/jmaslek/etf_scraper. For screeners with many results (exceeding the `--num` flag) +Repo can be found at . For screeners with many results (exceeding the `--num` flag) , the console will display a random subset of them. -Note that to use the config file, locate the desired data column then change MIN and MAX. Make sure unused columns are set to None. -Example which will screen for ETFs the Opened between $45 and $57 (note the available data is Open and Previous Close): +Note that to use the config file, locate the desired data column then change MIN and MAX. Make sure unused columns are +set to None. Example which will screen for ETFs the Opened between $45 and $57 (note the available data is Open and +Previous Close): + ```python [OPEN] MIN = 45 @@ -163,17 +184,18 @@ MAX = 57 ``` - -``` +```text # WSJ -The following functions atake the information from the [WSJ Market Data Page](https://www.wsj.com/market-data) +The following functions take the information from the [WSJ Market Data Page](https://www.wsj.com/market-data) ## gainers ```python usage: gainers [-n NUM] [--export {csv,json,xlsx}] [-h] ``` + Shows top gaining ETFs + * -n/--num: Number to show. Defaults to 25, which is the max provided * --export: Export data to one of {csv, json, xlsx}. @@ -182,7 +204,9 @@ Shows top gaining ETFs ```python usage: decliners [-n NUM] [--export {csv,json,xlsx}] [-h] ``` + Shows highest declining ETFs + * -n/--num: Number to show. Defaults to 25, which is the max provided * --export: Export data to one of {csv, json, xlsx}. @@ -191,6 +215,8 @@ Shows highest declining ETFs ```python usage: active [-n NUM] [--export {csv,json,xlsx}] [-h] ``` + Shows most active ETFs + * -n/--num: Number to show. Defaults to 25, which is the max provided * --export: Export data to one of {csv, json, xlsx}. diff --git a/gamestonk_terminal/forex/README.md b/gamestonk_terminal/forex/README.md index 5e127cee0a3..84ce6b5b57a 100644 --- a/gamestonk_terminal/forex/README.md +++ b/gamestonk_terminal/forex/README.md @@ -3,48 +3,51 @@ This menu utilizes oanda to enable support for trading forex. * [summary](#summary) - * Display a summary of your account + * Display a summary of your account * [calendar](#calendar) - * Get information about past or upcoming events which may impact the price + * Get information about past or upcoming events which may impact the price * [list](#list) - * List your order history + * List your order history * [pending](#pending) - * Get information about pending orders + * Get information about pending orders * [cancel](#cancel) - * Cancel a pending order by ID + * Cancel a pending order by ID * [positions](#positions) - * Get information about your positions + * Get information about your positions * [trades](#trades) - * See a list of open trades + * See a list of open trades * [closetrade](#closetrade) - * Close a trade by ID + * Close a trade by ID * [load](#load) - * Specify an instrument to use + * Specify an instrument to use * [candles](#candles) - * Get a candlestick chart for the forex instrument + * Get a candlestick chart for the forex instrument * [price](#price) - * Show the current price for the forex instrument + * Show the current price for the forex instrument * [order](#order) - * Place a limit order + * Place a limit order * [orderbook](#orderbook) - * Display the orderbook if Oanda provides one for the forex instrument + * Display the orderbook if Oanda provides one for the forex instrument * [positionbook](#positionbook) - * Display the positionbook if Oanda provides one for the forex instrument + * Display the positionbook if Oanda provides one for the forex instrument * [news](#news) - * Latest news of the currency provided by [News API] + * Latest news of the currency provided by [News API] * [reddit](#reddit) - * Gets due diligence from another user's post [Reddit] + * Gets due diligence from another user's post [Reddit] * [eda](#eda) - * This menu aims to perform exploratory data analysis on a pre-loaded forex instrument. + * This menu aims to perform exploratory data analysis on a pre-loaded forex instrument. * [ba](#ba) - * This menu aims to extrapolate behavioural analysis regarding a pre-loaded forex instrument. + * This menu aims to extrapolate behavioural analysis regarding a pre-loaded forex instrument. ## summary - ```text - usage: summary - ``` - Displays current balance, net asset value, unrealized P/L, total P/L, count of open trades, how much margin is available, how much margin you've used, the margin call value, the percent of margin until closeout, and the total position value. +```text +usage: summary +``` + +Displays current balance, net asset value, unrealized P/L, total P/L, count of open trades, how much margin is +available, how much margin you've used, the margin call value, the percent of margin until closeout, and the total +position value. ## calendar @@ -52,27 +55,37 @@ This menu utilizes oanda to enable support for trading forex. usage: calendar [-d DAYS] ``` -Display information about past or upcoming events up to 30 days before or from todays date. The information includes the Title of the event, the time the event is scheduled, the rated impact, Oanda's forecast, the market forecast, the currency involved, the region from which the event originates, the actual value (for events that have finished), and the previous value. +Display information about past or upcoming events up to 30 days before or from todays date. The information includes +the Title of the event, the time the event is scheduled, the rated impact, Oanda's forecast, the market forecast, the +currency involved, the region from which the event originates, the actual value (for events that have finished), and +the previous value. -* -d : The number of days to search (7 is the default, 30 is the maximum that information is provided for). Use a positive value to search for upcoming events and a negative value to search for past events. +* -d : The number of days to search (7 is the default, 30 is the maximum that information is provided for). Use a + positive value to search for upcoming events and a negative value to search for past events. ## list + ```text usage: list [-s STATE] [-c COUNT] ``` -Retrieves a list of orders you've made. It includes the ID, the instrument, the number of units, the price, the state of the order, and the type of order. +Retrieves a list of orders you've made. It includes the ID, the instrument, the number of units, the price, the state +of the order, and the type of order. * -s : The state of the orders to filter. You can specify: pending, filled, triggered, canceled or all. (default=all) * -c : The number of orders to retrieve. (default = 20) ## pending + ```text usage: pending ``` -A shortcut to list the pending orders for your account. It includes the ID, the instrument, the price, the number of units, the time the order was created and the time in force. + +A shortcut to list the pending orders for your account. It includes the ID, the instrument, the price, the number of +units, the time the order was created and the time in force. ## cancel + ```text usage: cancel [-i ORDERID] ``` @@ -82,30 +95,40 @@ Cancel a pending order by its order ID. * -i : Specify the order ID. You don't need to include this, simply include the order number. ## positions + ```text usage: positions ``` -Lists your open positions. The information includes the instrument, the current number of long units, the total profit/loss from long positions for the account, the unrealized profit/loss from long positions, the current number of short units, the total profit/loss from short positions for the account, and the unrealized profit/loss from short positions. +Lists your open positions. The information includes the instrument, the current number of long units, the total +profit/loss from long positions for the account, the unrealized profit/loss from long positions, the current number of +short units, the total profit/loss from short positions for the account, and the unrealized profit/loss from short +positions. ## trades + ```text usage: trades ``` -Lists the current open trades for your account. The information includes the ID, the instrument, the initial units opened for the trade, the current number of units open for the trade, it's entry price, and the unrealized profit/loss for the trade. +Lists the current open trades for your account. The information includes the ID, the instrument, the initial units +opened for the trade, the current number of units open for the trade, it's entry price, and the unrealized profit/loss +for the trade. ## closetrade + ```text usage: closetrade [-i ORDERID] [-u UNITS] ``` -Closes a trade by ID. Displays the order ID closed, the instrument, the number of units that were closed, the price, and the profit/loss +Closes a trade by ID. Displays the order ID closed, the instrument, the number of units that were closed, the price, +and the profit/loss * -i : Specify the order ID. You don't need to include this, simply include the order number. * -u : Specify the number of units to close for that trade. (default=all) ## load + ```text usage: load [-i INSTRUMENT] ``` @@ -115,24 +138,38 @@ Specify the instrument to use in the format EUR_USD * -i : Specify the instrument. You don't need to include this, simply include the instrument. ## candles + ```text usage: candles [-g GRANULARITY] [-c CANDLECOUNT] [-abcCeorsv] ``` Retrieve a candlestick chart for the currently loaded instrument. Not a live chart. -* -g : Specify the granularity, which is the timeframe each candle represents. The available granularities are Seconds: S5, S10, S15, S30 Minutes: M1, M2, M4, M5, M10, M15, M30 Hours: H1, H2, H3, H4, H6, H8, H12 Day: D, Week: W Month: M. (default=D) +* -g : Specify the granularity, which is the timeframe each candle represents. The available granularities are Seconds: + S5, S10, S15, S30 Minutes: M1, M2, M4, M5, M10, M15, M30 Hours: H1, H2, H3, H4, H6, H8, H12 Day: D, Week: W Month: M. (default=D) * -c : Specify the number of candles to retrieve. (default=180) -* -a : Adds AD (Accumulation/Distribution Index) to the chart. AD is a cumulative indicator that uses volume and price to assess whether a stock is being accumulated or distributed. This provides insight into how strong a trend is. [Investopedia](#https://www.investopedia.com/terms/a/accumulationdistribution.asp) -* -b : Adds Bollinger Bands to the chart. Bollinger bands are a set of trendlines plotted two standard deviations (positively and negatively) away from a simple moving average of a security's price. [Investopedia](#https://www.investopedia.com/terms/b/bollingerbands.asp) -* -C : Adds CCI (Commodity Channel Index) to the chart. CCI is a momentum-based oscillator used to help determine when an investment vehicle is reaching a condition of being overbought or oversold. (default=14) [Investopedia](#https://www.investopedia.com/terms/c/commoditychannelindex.asp) -* -e : Adds EMA (Exponential Moving Average) to the chart. EMA is a moving average that places a greater weight and significance on the most recent data points. (default=10) [Investopedia](#https://www.investopedia.com/terms/e/ema.asp) -* -o : Adds OBV (On Balance Volume) to the chart. OBV is a momentum indicator that uses volume flow to predict changes in price. [Investopedia](#https://www.investopedia.com/terms/o/onbalancevolume.asp) -* -r : Adds RSI (Relative Strength Index) to the chart. RSI is a momentum indicator that measures the magnitude of recent price changes to evaluate overbought or oversold conditions. (default=14) [Investopedia](#https://www.investopedia.com/terms/r/rsi.asp) -* -s : Adds SMA (Simple Moving Average) to the chart. SMA calculates the average of a selected range of prices, usually closing prices, by the number of periods in that range. (defaults= 20, 50) [Investopedia](#https://www.investopedia.com/terms/s/sma.asp) -* -v : Adds VWAP (Volume Weighted Average Price) to the chart. VWAP gives the average price a security has traded at throughout the day, based on both volume and price. [Investopedia](#https://www.investopedia.com/terms/v/vwap.asp) +* -a : Adds AD (Accumulation/Distribution Index) to the chart. AD is a cumulative indicator that uses volume and price + to assess whether a stock is being accumulated or distributed. This provides insight into how strong a trend is. + [Investopedia](#https://www.investopedia.com/terms/a/accumulationdistribution.asp) +* -b : Adds Bollinger Bands to the chart. Bollinger bands are a set of trendlines plotted two standard deviations + (positively and negatively) away from a simple moving average of a security's price. + [Investopedia](#https://www.investopedia.com/terms/b/bollingerbands.asp) +* -C : Adds CCI (Commodity Channel Index) to the chart. CCI is a momentum-based oscillator used to help determine when + an investment vehicle is reaching a condition of being overbought or oversold. (default=14) + [Investopedia](#https://www.investopedia.com/terms/c/commoditychannelindex.asp) +* -e : Adds EMA (Exponential Moving Average) to the chart. EMA is a moving average that places a greater weight and + significance on the most recent data points. (default=10) [Investopedia](#https://www.investopedia.com/terms/e/ema.asp) +* -o : Adds OBV (On Balance Volume) to the chart. OBV is a momentum indicator that uses volume flow to predict changes + in price. [Investopedia](#https://www.investopedia.com/terms/o/onbalancevolume.asp) +* -r : Adds RSI (Relative Strength Index) to the chart. RSI is a momentum indicator that measures the magnitude of + recent price changes to evaluate overbought or oversold conditions. (default=14) [Investopedia](#https://www.investopedia.com/terms/r/rsi.asp) +* -s : Adds SMA (Simple Moving Average) to the chart. SMA calculates the average of a selected range of prices, usually + closing prices, by the number of periods in that range. (defaults= 20, 50) [Investopedia](#https://www.investopedia.com/terms/s/sma.asp) +* -v : Adds VWAP (Volume Weighted Average Price) to the chart. VWAP gives the average price a security has traded at + throughout the day, based on both volume and price. [Investopedia](#https://www.investopedia.com/terms/v/vwap.asp) ## price + ```text usage: price ``` @@ -140,6 +177,7 @@ usage: price Gets the current price for the currently loaded instrument ## order + ```text usage: order -u UNITS -p PRICE ``` @@ -150,15 +188,19 @@ Places a limit order for the specified number of units at the specified price. B * -p : Specify the price for the limit order. ## orderbook + ```text usage: orderbook ``` + Plots the current orderbook for loaded instrument if one is provided by Oanda. Not a live chart. ## positionbook + ```text usage: positionbook ``` + Plots the current positionbook for the loaded instrument if one is provided by Oanda. Not a live chart. ## news @@ -181,9 +223,11 @@ Print top stock's due diligence from other users. [Source: Reddit] * -l : limit of posts to retrieve * -d : number of prior days to look for -* -a : "search through all flairs (apart from Yolo and Meme). Default False (i.e. use flairs: DD, technical analysis, Catalyst, News, Advice, Chart, Charts and Setups, Fundamental Analysis, Forex, Trade Idea) +* -a : "search through all flairs (apart from Yolo and Meme). Default False (i.e. use flairs: DD, technical analysis, + Catalyst, News, Advice, Chart, Charts and Setups, Fundamental Analysis, Forex, Trade Idea) ## eda + ```text usage: eda ``` @@ -191,7 +235,9 @@ usage: eda Access the exploratory data analysis menu. ## ba + ```text usage: ba ``` + Access the behavioural analysis menu. diff --git a/gamestonk_terminal/options/presets/README.md b/gamestonk_terminal/options/presets/README.md index fab4665f9b8..72c9139aa04 100644 --- a/gamestonk_terminal/options/presets/README.md +++ b/gamestonk_terminal/options/presets/README.md @@ -7,45 +7,49 @@ ## How to add Presets -1. Go to the folder GamestonkTerminal/gamestonk_terminal/options/presets. +1. Go to the folder GamestonkTerminal/gamestonk_terminal/options/presets. 2. There should be a `README.md` file and multiple `.ini` files. One of these `.ini` files should be named `template.ini`. -Captura de ecrรฃ 2021-06-28, ร s 22 00 14 + Image1 3. Copy the `template.ini` file and paste it in the same directory. 4. Rename that file to something you find meaningful, e.g. `my_own_filter.ini`. -Captura de ecrรฃ 2021-06-28, ร s 22 04 27 + Image2 -5. Open the file you just renamed (e.g. `my_own_filter.ini`), and set the parameters you want to filter. +5. Open the file you just renamed (e.g. `my_own_filter.ini`), and set the parameters you want to filter. -Captura de ecrรฃ 2021-06-28, ร s 22 08 16 + Image3 -6. It may be useful to play with the main source https://ops.syncretism.io since you can tweak these and understand how they influence the outcome of the filtered stocks. +6. It may be useful to play with the main source since you can tweak these and understand + how they influence the outcome of the filtered stocks. -Captura de ecrรฃ 2021-06-28, ร s 22 53 13 + Image4 7. Update the Author and Description name. E.g. -Captura de ecrรฃ 2021-06-28, ร s 23 26 26 + Image5 8. Start the terminal, and go to the `> op` menu. In there, you can play with it on the terminal as shown: -* **disp**: Allows to see the screeners available. I.e. all `.ini` files in presets folder. -* **disp **: Allows to see the specific parameters set for the preset selected. -* **scr **: Allows to show stocks that are filtered using the selected preset. - * Note: As default, if the user does **scr** this will use the `template.ini` file. So, the user can do some tests with teaking of parameters on the `template.ini` file. -Captura de ecrรฃ 2021-06-28, ร s 23 28 36 + * **disp**: Allows to see the screeners available. I.e. all `.ini` files in presets folder. + * **disp **: Allows to see the specific parameters set for the preset selected. + * **scr **: Allows to show stocks that are filtered using the selected preset. + * Note: As default, if the user does **scr** this will use the `template.ini` file. So, the user can do some tests + with tweaking of parameters on the `template.ini` file. -9. Share with other Apes. You can do so by either creating yourself a Pull Request with this change, or asking a dev (e.g. @Sexy_Year) on our discord server to add it for you. + Image6 + +9. Share with other Apes. You can do so by either creating yourself a Pull Request with this change, or asking a dev + (e.g. @Sexy_Year) on our discord server to add it for you. --- ## template * **Author of preset:** GamestonkTerminal -* **Contact:** https://github.com/DidierRLopes/GamestonkTerminal#contacts -* **Description:** Template with all available filters and their options menu. More information can be found in https://ops.syncretism.io/index.html. +* **Contact:** +* **Description:** Template with all available filters and their options menu. More information can be found in . --- diff --git a/gamestonk_terminal/portfolio/brokers/README.md b/gamestonk_terminal/portfolio/brokers/README.md index 4c95ea84c9d..8ef12a818d8 100644 --- a/gamestonk_terminal/portfolio/brokers/README.md +++ b/gamestonk_terminal/portfolio/brokers/README.md @@ -1,52 +1,65 @@ # BROKERS -This page shows the available brokers for loading your holdings. If yours is not listed, please submit a new issue and we will look into adding it. +This page shows the available brokers for loading your holdings. If yours is not listed, please submit a new issue and +we will look into adding it. Current brokers: + * rh : Robinhood * ally: Ally * dg : Degiro - Once this screen is accessed, the first command to be run is -```` + +```text login [brokers] -```` +``` The brokers should just be your brokers from the list shown on the first menu. To login to Robinhood, the command is -```` + +```text login rh -```` +``` + To login to both robinhood and alpaca: -```` + +```text login rh alp -```` +``` + After logging in, the help menu will display which brokers you logged into. -Your login information should be stored as environment variables in [config file](/gamestonk_terminal/config_terminal.py), but check each individual section for specifics. +Your login information should be stored as environment variables in [config file](/gamestonk_terminal/config_terminal.py), +but check each individual section for specifics. [ROBINHOOD](#ROBINHOOD) + * [rhhold](#rhhold) - * Look at current (stock only) holdings + * Look at current (stock only) holdings * [rhhist](#rhhist) - * Get and plot historical portfolio + * Get and plot historical portfolio [ALLY](#ALLY) + * [allyhold](#allyhold) * Look at Ally Invest Holdings [DEGIRO standalone menu](/gamestonk_terminal/brokers/degiro/) [Merge](#Merge) + * [hold](#hold) * View holdings across all brokers - ## ROBINHOOD + Robinhood has Two Factor Authentication, so you will likely be prompted to enter a code that is texted/emailed to you. -###NOTE THAT LOGGING IN WILL SAVE A TOKEN TO `os.path.expanduser("~")/.tokens` WHICH CAN BE USED TO LOGIN EVEN IF USER CREDENTIALS ARE INCORRECT. + +**NOTE** THAT LOGGING IN WILL SAVE A TOKEN TO `os.path.expanduser("~")/.tokens` WHICH CAN BE USED TO LOGIN EVEN IF USER +CREDENTIALS ARE INCORRECT. In order to login, the [config file](/gamestonk_terminal/config_terminal.py) requires two variables: + * "GT_RH_USERNAME" * "GT_RH_PASSWORD" @@ -54,9 +67,10 @@ In order to login, the [config file](/gamestonk_terminal/config_terminal.py) req Displays current holdings to the console: -```` +```text usage: rhhold -```` +``` + There are no additional flags. This just prints all current stonks, their last price, previous close, your equity and the % change from previous close. @@ -65,14 +79,18 @@ Example: ![hold](https://user-images.githubusercontent.com/18151143/111685384-3c6ab080-87fe-11eb-80ce-9b256c396bf2.png) ### rhhist -Display your RH portfolio based on provided interval and span. Based on the API data availablility, plotted as a candlestick chart. -```` + +Display your RH portfolio based on provided interval and span. Based on the API data availability, plotted as a +candlestick chart. + +```text usage: rhhist [-s --span] [-i --interval] -```` +``` + * -s/--span : How long to look back. Defaults to the day. Options: - * [day, week, month, 3month, year, 5year, all] + * [day, week, month, 3month, year, 5year, all] * -i/--interval: Data resolution. Defaults to 10minute intervals. Options: - * [5minute, 10minute, hour, day, week] + * [5minute, 10minute, hour, day, week] Example Default Output: @@ -85,6 +103,7 @@ In order to access your Ally Invest account through the API, you must first acqu Once you have this, you want to load in the following environment variables (similar to alpaca, the api will access these directly from the environment) + * ALLY_CONSUMER_KEY * ALLY_CONSUMER_SECRET * ALLY_OAUTH_TOKEN @@ -93,13 +112,16 @@ directly from the environment) * This is obtained from your actual account - not through the api application. As of writing this, the ally API does not provide historical portfolio data, so only a holdings option is provided. -### allyhold -Show all Ally Invest holdings: -```` -usage : allyhold -```` -No additional flags. +### allyhold + +Show all Ally Invest holdings: + +```text +usage : allyhold +``` + +No additional flags. ## Merge @@ -109,7 +131,9 @@ viewing holding across all platforms. The PnL is shown for all time (Market Val ### hold Show holdings across all brokers that are logged in. -```` + +```text usage: hold -```` +``` + Currently no additional flags. If not all brokers are represented, double check that they are logged in. diff --git a/gamestonk_terminal/portfolio/brokers/degiro/README.md b/gamestonk_terminal/portfolio/brokers/degiro/README.md index a3435402869..0a07704ad44 100644 --- a/gamestonk_terminal/portfolio/brokers/degiro/README.md +++ b/gamestonk_terminal/portfolio/brokers/degiro/README.md @@ -21,7 +21,8 @@ In order to use 2FA you need to update [config file](/gamestonk_terminal/config_ | :--- | :--- | | DG_TOTP_SECRET | This secret key will let Gamestonk generate the `OneTimePassword` for you. | -If you provide your `DG_TOTP_SECRET`, you won't have to type your `OneTimePassword`, Gamestonk will generate it for you at each connection. +If you provide your `DG_TOTP_SECRET`, you won't have to type your `OneTimePassword`, Gamestonk will generate it for you +at each connection. `DG_TOTP_SECRET` is the text representation of the `QRCODE` that Degiro's provide you when you enable 2FA. @@ -30,34 +31,34 @@ More information on 2FA credentials, in the documentation of the [degiro-connect ## Features * [login](#login) - * Connect to your Degiro account + * Connect to your Degiro account * [logout](#login) - * Disconnect from Degiro account + * Disconnect from Degiro account * [hold](#hold) - * Command to look at current holdings + * Command to look at current holdings * [lookup](#lookup) - * Command to search for a product by name + * Command to search for a product by name * [create](#create) - * Create and `Order` + * Create and `Order` * [update](#update) - * Update and `Order` + * Update and `Order` * [cancel](#cancel) - * Cancel and `Order` + * Cancel and `Order` * [pending](#pending) - * Command to list pending orders + * Command to list pending orders * [companynews](#companynews) - * Command to get news about a company with it's isin + * Command to get news about a company with it's isin * [lastnews](#lastnews) - * Command to get latest news + * Command to get latest news * [topnews](#topnews) - * Command to get top news preview - + * Command to get top news preview ### login -```` + +```text usage: login [-u USERNAME] [-p PASSWORD] [-o OTP] [-s TOPT_SECRET] [-h] optional arguments: @@ -69,28 +70,31 @@ optional arguments: -s TOPT_SECRET, --topt-secret TOPT_SECRET TOTP SECRET (2FA). -h, --help show this help message -```` +``` ### logout -```` -usage: logout -```` +```text +usage: logout +``` ### hold -```` + +```text usage: hold -```` +``` Displays current holdings to the console. ### lookup -```` + +```text usage: lookup TESLA -```` +``` It will display a result like this : -``` + +```text name isin symbol productType currency closePrice closePriceDate 0 Tesla US88160R1014 TSLA STOCK USD 571.690 2021-05-13 1 Tesla Inc US88160R1014 TL0 STOCK EUR 478.000 2021-05-13 @@ -104,47 +108,52 @@ It will display a result like this : 9 Leverage Shares 1x Tesla ETP IE00BKT6ZH01 STSL ETF GBX 135.550 2021-05-13 ``` - ### create -```` + +```text usage: create [-a {buy,sell}] (-prod PRODUCT | -sym SYMBOL) -p PRICE (-s SIZE | -up UP_TO) [-d {gtd,gtc}] [-t {limit,market,stop-limit,stop-loss}] [-h] -```` +``` ### update -```` + +```text usage: update ORDER_ID -p PRICE -```` +``` ### cancel -```` + +```text usage: cancel ORDER_ID -```` +``` ### pending -```` -usage: pending -```` +```text +usage: pending +``` ### companynews -```` + +```text usage: companynews NL0000235190 -```` +``` You need to provide the `ISIN` number of the company. You can get this `ISIN` using the `dglookup` command for instance. ### lastnews -```` + +```text usage: lastnews [-l LIMIT] [-h] optional arguments: -l LIMIT, --limit LIMIT Number of news to display. -h, --help show this help message -```` +``` ### topnews -```` + +```text usage: topnews -```` +``` diff --git a/gamestonk_terminal/portfolio/portfolio_analysis/README.md b/gamestonk_terminal/portfolio/portfolio_analysis/README.md index 2f128e07183..f1404d7c610 100644 --- a/gamestonk_terminal/portfolio/portfolio_analysis/README.md +++ b/gamestonk_terminal/portfolio/portfolio_analysis/README.md @@ -1,6 +1,7 @@ # PORTFOLIO ANALYSIS -This menu aims to analyze a portfolio loaded through csv/json/xlsx, and the usage of the following commands along with an example will be exploited below. +This menu aims to analyze a portfolio loaded through csv/json/xlsx, and the usage of the following commands along with +an example will be exploited below. * [load](#load) * load portfolio from a file @@ -8,10 +9,16 @@ This menu aims to analyze a portfolio loaded through csv/json/xlsx, and the usag * view holdings by a user input group ## load -``` + +```text usage: load [-p PATH] [--no_sector] [--no_last_price] [--nan] ``` -This function allows you to load from a predefined file. The file can contain any information you want, but the stocks should be under a column `Ticker`. The number owned should be defined in `Shares`. By default, this will loop through all Tickers and pull sector and latest price. An example column that could be added would be if the ticker is considered a Value or Growth stock. + +This function allows you to load from a predefined file. The file can contain any information you want, but the stocks +should be under a column `Ticker`. The number owned should be defined in `Shares`. By default, this will loop through +all Tickers and pull sector and latest price. An example column that could be added would be if the ticker is considered +a Value or Growth stock. + * -p/--path : Path to portfolio file. A template is supplied and the default path points to it. * --no_sector : Flag to avoid getting the sector of each stock. * --no_last_price : Flag to avoid getting the latest price for each supplied stock. @@ -35,10 +42,13 @@ This function allows you to load from a predefined file. The file can contain a ``` ## group -``` + +```text usage: group [-g GROUP] ``` + Displays data in groups based on columns. Currently this only looks at the `value` column. + * -g/--group : Column to group data by. Ex: "sector" ```python diff --git a/gamestonk_terminal/portfolio/portfolio_optimization/README.md b/gamestonk_terminal/portfolio/portfolio_optimization/README.md index ae0c9d464dd..6bec706d02f 100644 --- a/gamestonk_terminal/portfolio/portfolio_optimization/README.md +++ b/gamestonk_terminal/portfolio/portfolio_optimization/README.md @@ -1,7 +1,7 @@ # PORTFOLIO OPTIMIZATION -This menu aims to optimize a portfolio of pre-loaded stocks, and the usage of the following commands along with an example will be exploited below. - +This menu aims to optimize a portfolio of pre-loaded stocks, and the usage of the following commands along with an +example will be exploited below. * [select](#select) * select list of tickers to be optimized @@ -37,11 +37,11 @@ This menu aims to optimize a portfolio of pre-loaded stocks, and the usage of th * show the efficient frontier   + * [> ca](comparison_analysis/README.md) * **comparison analysis for selected tickers** - - +## Tickers ### select @@ -50,6 +50,7 @@ select [-t SELECT_TICKERS] ``` Add/Select tickers for portfolio to be optimized. + * -t: Tickers to be used in the portfolio to optimize. ### add @@ -59,6 +60,7 @@ add [-t ADD_TICKERS] ``` Add tickers to the list of the tickers to be optimized. + * -t: Tickers to be used in the portfolio to optimize ### rmv @@ -68,6 +70,7 @@ rmv [-t RMV_TICKERS] ``` Remove tickers from the list of the tickers to be optimized. + * -t: Tickers to be removed from the tickers to optimize. ## Optimization @@ -80,12 +83,12 @@ equal [-v VALUE] [--pie] Returns an equally weighted portfolio -* -v : If provided, this represents an actual allocation amount for the portfolio. Defaults to 1, which just returns the weights. +* -v : If provided, this represents an actual allocation amount for the portfolio. Defaults to 1, which just returns + the weights. * --pie : Display a pie chart for weights ![equal](https://user-images.githubusercontent.com/25267873/114958292-9771e080-9e5a-11eb-9de6-1c2dfbe1e27b.png) - ### mktcap ```text @@ -94,12 +97,12 @@ property -p marketCap [-v VALUE] [--pie] Returns a portfolio that is weighted based on market cap info -* -v : If provided, this represents an actual allocation amount for the portfolio. Defaults to 1, which just returns the weights. +* -v : If provided, this represents an actual allocation amount for the portfolio. Defaults to 1, which just returns + the weights. * --pie : Display a pie chart for weights ![mktCap](https://user-images.githubusercontent.com/25267873/115084151-57fdcf80-9f00-11eb-885c-bfe93de0eb6b.png) - ### dividend ```text @@ -108,11 +111,11 @@ property -p dividend [-v VALUE] [--pie] Returns a portfolio that is weighted based on dividend yield info -* -v : If provided, this represents an actual allocation amount for the portfolio. Defaults to 1, which just returns the weights. +* -v : If provided, this represents an actual allocation amount for the portfolio. Defaults to 1, which just returns + the weights. * --pie : Display a pie chart for weights -Captura de ecrรฃ 2021-04-16, ร s 22 11 41 - +Property ### property @@ -122,13 +125,27 @@ property [-p PROPERTY] [-v VALUE] [--pie] Returns a portfolio that is weighted based on a selected property info -* -p : Property info to weigh. Use one of: previousClose, regularMarketOpen, twoHundredDayAverage, trailingAnnualDividendYield, payoutRatio, volume24Hr, regularMarketDayHigh, navPrice, averageDailyVolume10Day, totalAssets, regularMarketPreviousClose, fiftyDayAverage, trailingAnnualDividendRate, open, toCurrency, averageVolume10days, expireDate, yield, algorithm, dividendRate, exDividendDate, beta, circulatingSupply, regularMarketDayLow, priceHint, currency, trailingPE, regularMarketVolume, lastMarket, maxSupply, openInterest, marketCap, volumeAllCurrencies, strikePrice, averageVolume, priceToSalesTrailing12Months, dayLow, ask, ytdReturn, askSize, volume, fiftyTwoWeekHigh, forwardPE, fromCurrency, fiveYearAvgDividendYield, fiftyTwoWeekLow, bid, dividendYield, bidSize, dayHigh, annualHoldingsTurnover, enterpriseToRevenue, beta3Year, profitMargins, enterpriseToEbitda, 52WeekChange, morningStarRiskRating, forwardEps, revenueQuarterlyGrowth, sharesOutstanding, fundInceptionDate, annualReportExpenseRatio, bookValue, sharesShort, sharesPercentSharesOut, fundFamily, lastFiscalYearEnd, heldPercentInstitutions, netIncomeToCommon, trailingEps, lastDividendValue, SandP52WeekChange, priceToBook, heldPercentInsiders, shortRatio, sharesShortPreviousMonthDate, floatShares, enterpriseValue, threeYearAverageReturn, lastSplitFactor, legalType, lastDividendDate, morningStarOverallRating, earningsQuarterlyGrowth, pegRatio, lastCapGain, shortPercentOfFloat, sharesShortPriorMonth, impliedSharesOutstanding, fiveYearAverageReturn, and regularMarketPrice. -* -v : If provided, this represents an actual allocation amount for the portfolio. Defaults to 1, which just returns the weights. +* -p : Property info to weigh. Use one of: previousClose, regularMarketOpen, twoHundredDayAverage, + trailingAnnualDividendYield, payoutRatio, volume24Hr, regularMarketDayHigh, navPrice, averageDailyVolume10Day, + totalAssets, regularMarketPreviousClose, fiftyDayAverage, trailingAnnualDividendRate, open, toCurrency, + averageVolume10days, expireDate, yield, algorithm, dividendRate, exDividendDate, beta, circulatingSupply, + regularMarketDayLow, priceHint, currency, trailingPE, regularMarketVolume, lastMarket, maxSupply, openInterest, + marketCap, volumeAllCurrencies, strikePrice, averageVolume, priceToSalesTrailing12Months, dayLow, ask, ytdReturn, + askSize, volume, fiftyTwoWeekHigh, forwardPE, fromCurrency, fiveYearAvgDividendYield, fiftyTwoWeekLow, bid, + dividendYield, bidSize, dayHigh, annualHoldingsTurnover, enterpriseToRevenue, beta3Year, profitMargins, + enterpriseToEbitda, 52WeekChange, morningStarRiskRating, forwardEps, revenueQuarterlyGrowth, sharesOutstanding, + fundInceptionDate, annualReportExpenseRatio, bookValue, sharesShort, sharesPercentSharesOut, fundFamily, + lastFiscalYearEnd, heldPercentInstitutions, netIncomeToCommon, trailingEps, lastDividendValue, SandP52WeekChange, + priceToBook, heldPercentInsiders, shortRatio, sharesShortPreviousMonthDate, floatShares, enterpriseValue, + threeYearAverageReturn, lastSplitFactor, legalType, lastDividendDate, morningStarOverallRating, + earningsQuarterlyGrowth, pegRatio, lastCapGain, shortPercentOfFloat, sharesShortPriorMonth, impliedSharesOutstanding, + fiveYearAverageReturn, and regularMarketPrice. +* -v : If provided, this represents an actual allocation amount for the portfolio. Defaults to 1, which just returns + the weights. * --pie : Display a pie chart for weights ![marketCap](https://user-images.githubusercontent.com/25267873/114958294-980a7700-9e5a-11eb-9db4-d06e6a1e8981.png) - ## Mean Variance Optimization These approaches are based off of the efficient frontier approach, which is meant to solve the following optimization problem. @@ -139,105 +156,110 @@ These approaches are based off of the efficient frontier approach, which is mean * Where S is the covariance matrix between stocks and R is the expected returns. * The condition that all weights add up to 1 just implies that you want to have a net long portfolio (with no margin). -* A long-short portfolio can have negative weights and usually wants to have everything add up to 0 for a market-neutral strategy. +* A long-short portfolio can have negative weights and usually wants to have everything add up to 0 for a market-neutral + strategy. Currently, we do not allow for changing risk models or adding constraints. If there is something specific, please submit a feature request, or if you can write it, feel free to add a PR! All of these commands use [PyPortFolioOpt](#https://pyportfolioopt.readthedocs.io/en/latest/index.html) package. - ### maxsharpe -```` +```text usage: max_sharpe [-p {1d,5d,1mo,3mo,6mo,1y,2y,5y,10y,ytd,max}] [-v VALUE] [--pie] [-r RISK_FREE_RATE] -```` +``` -Maximise the Sharpe Ratio. The result is also referred to as the tangency portfolio, as it is the portfolio for which the capital market line is tangent to the efficient frontier. This is a convex optimization problem after making a certain variable substitution. See Cornuejols and Tutuncu (2006) for more. The sharpe ratio is defined as (Mean Returns - Risk Free Rate)/(Standard Deviation of Returns). +Maximise the Sharpe Ratio. The result is also referred to as the tangency portfolio, as it is the portfolio for which +the capital market line is tangent to the efficient frontier. This is a convex optimization problem after making a +certain variable substitution. See Cornuejols and Tutuncu (2006) for more. +The sharpe ratio is defined as (Mean Returns - Risk Free Rate)/(Standard Deviation of Returns). * -p : Amount of time to retrieve data from yfinance. Default: 3mo. -* -v : If provided, this represents an actual allocation amount for the portfolio. Defaults to 1, which just returns the weights. +* -v : If provided, this represents an actual allocation amount for the portfolio. Defaults to 1, which just returns + the weights. * --pie : Display a pie chart for weights maxsharpe - ### minvol -```` +```text usage: minvol [-p {1d,5d,1mo,3mo,6mo,1y,2y,5y,10y,ytd,max}] [-v VALUE] [--pie] -```` +``` This portfolio minimizes the total volatility, which also means it has the smallest returns among the efficient frontier. * -p : Amount of time to retrieve data from yfinance. Default: 3mo. -* -v : If provided, this represents an actual allocation amount for the portfolio. Defaults to 1, which just returns the weights. +* -v : If provided, this represents an actual allocation amount for the portfolio. Defaults to 1, which just returns + the weights. * --pie : Display a pie chart for weights ![min_vol](https://user-images.githubusercontent.com/25267873/114958290-96d94a00-9e5a-11eb-9b7c-deba8a8e7249.png) min_vol2 - ### maxquadutil -```` +```text usage: maxquadutil [-p {1d,5d,1mo,3mo,6mo,1y,2y,5y,10y,ytd,max}] [-v VALUE] [--pie] [-r RISK_AVERSION] [-n] -```` +``` Maximises the quadratic utility, given some risk aversion. * -p : Amount of time to retrieve data from yfinance. Default: 3mo. -* -v : If provided, this represents an actual allocation amount for the portfolio. Defaults to 1, which just returns the weights. +* -v : If provided, this represents an actual allocation amount for the portfolio. Defaults to 1, which just returns + the weights. * --pie : Display a pie chart for weights * -r : Risk aversion parameter * -n : Whether the portfolio should be market neutral (weights sum to zero). Defaults: False. maxquadutil - ### effret -```` +```text usage: effret [-p {1d,5d,1mo,3mo,6mo,1y,2y,5y,10y,ytd,max}] [-v VALUE] [--pie] [-t TARGET_RETURN] [-n] -```` +``` Calculate the 'Markowitz portfolio', minimising volatility for a given target return. * -p : Amount of time to retrieve data from yfinance. Default: 3mo. -* -v : If provided, this represents an actual allocation amount for the portfolio. Defaults to 1, which just returns the weights. +* -v : If provided, this represents an actual allocation amount for the portfolio. Defaults to 1, which just returns + the weights. * --pie : Display a pie chart for weights * -t : The desired return of the resulting portfolio * -n : Whether the portfolio should be market neutral (weights sum to zero). Defaults: False. effret - ### effrisk -```` +```text usage: effrisk [-p {1d,5d,1mo,3mo,6mo,1y,2y,5y,10y,ytd,max}] [-v VALUE] [--pie] [-t TARGET_VOLATILITY] [-n] -```` +``` -Maximise return for a target risk. The resulting portfolio will have a volatility less than the target (but not guaranteed to be equal). +Maximise return for a target risk. The resulting portfolio will have a volatility less than the target (but not +guaranteed to be equal). * -p : Amount of time to retrieve data from yfinance. Default: 3mo. -* -v : If provided, this represents an actual allocation amount for the portfolio. Defaults to 1, which just returns the weights. +* -v : If provided, this represents an actual allocation amount for the portfolio. Defaults to 1, which just returns + the weights. * --pie : Display a pie chart for weights -* -t : The desired maximum volatility of the resultingportfolio +* -t : The desired maximum volatility of the resulting portfolio * -n : Whether the portfolio should be market neutral (weights sum to zero). Defaults: False. ![effrisk](https://user-images.githubusercontent.com/25267873/114958284-95a81d00-9e5a-11eb-8626-988505db8890.png) effrisk2 - ### ef -```` +```text usage: ef [-p {1d,5d,1mo,3mo,6mo,1y,2y,5y,10y,ytd,max}] [-n N_PORT] -```` +``` This function plots random portfolios based on their risk and returns and shows the efficient frontier. * -n : Number of portfolios to simulate. Default 300. -* -p : Amount of time to retrieve data from yfinance. Options are: 1d,5d,1mo,3mo,6mo,1y,2y,5y,10y,ytd,max and it defaults to 3mo. +* -p : Amount of time to retrieve data from yfinance. Options are: 1d,5d,1mo,3mo,6mo,1y,2y,5y,10y,ytd,max and it + defaults to 3mo. ![ef](https://user-images.githubusercontent.com/25267873/114958281-93de5980-9e5a-11eb-967b-d37ddd4f3e73.png) diff --git a/gamestonk_terminal/reports/README.md b/gamestonk_terminal/reports/README.md index c54bd7f578c..f3306a79127 100644 --- a/gamestonk_terminal/reports/README.md +++ b/gamestonk_terminal/reports/README.md @@ -1,58 +1,65 @@ # REPORTS This menu has a different concept from remaining menus. It has 2 main goals: - - Generate a personalised report. - - Allow the user to write notes on that notebook (report), as if it was his personal investment diary. +- Generate a personalised report. +- Allow the user to write notes on that notebook (report), as if it was his personal investment diary. ## How to create your own personal report 1. Copy one of the existing notebook reports as a template, e.g. [dark_pool.ipynb](/gamestonk_terminal/reports/dark_pool.ipynb). -2. Rename that notebook with a name that reflects what you want this notebook to contain, even including your name. +2. Rename that notebook with a name that reflects what you want this notebook to contain, even including your name. -3. One of the notebook cells will have a `parameters` tag, that's where the papermill will parametrize the notebook. Thus, your variables should be declared there. +3. One of the notebook cells will have a `parameters` tag, that's where the papermill will parametrize the notebook. + Thus, your variables should be declared there. 4. Remove the function calls that you don't care about to build your own report. 5. When building your template notebook, there are 2 type of possible things you can do: - * Create a markdown cell, where you can add a title or a description. E.g. - ``` + - Create a markdown cell, where you can add a title or a description. E.g. + + ```text ## Analyst Targets ``` - * Create a code cell, where you should both: import a module, and call a function to display a chart or print data. E.g. + + - Create a code cell, where you should both: import a module, and call a function to display a chart or print data. E.g. + ```python from gamestonk_terminal.stocks.due_diligence import finviz_view finviz_view.analyst(ticker=ticker, export='') ``` - -**Note**: In order to find the name of the function you want, you should either crawl through the codebase (and ask help in discord) or look into our readthedocs (#TODO). +**Note**: In order to find the name of the function you want, you should either crawl through the codebase (and ask +help in discord) or look into our readthedocs (#TODO). ## How to run the report -1. In [config_terminal](/gamestonk_terminal/config_terminal.py) you may need to change your `PAPERMILL_NOTEBOOK_REPORT_PORT` from `8888`. If the notebook generation fails, it is likely that the port selected is not the correct one. +1. In [config_terminal](/gamestonk_terminal/config_terminal.py) you may need to change your `PAPERMILL_NOTEBOOK_REPORT_PORT` + from `8888`. If the notebook generation fails, it is likely that the port selected is not the correct one. 2. Start the terminal with `python terminal.py` -3. Select `reports` context, and choose from the options selected - which are derived from the .ipynb jupyter notebook files on the [reports](/gamestonk_terminal/reports/) folder. +3. Select `reports` context, and choose from the options selected - which are derived from the .ipynb jupyter notebook + files on the [reports](/gamestonk_terminal/reports/) folder. -4. This should prompt you with a filled notebok with name: `__.ipynb`. E.g. `20210725_193517_dark_pool_AMC.ipynb` +4. This should prompt you with a filled notebook with name: `__.ipynb`. E.g. `20210725_193517_dark_pool_AMC.ipynb` 5. Due to the last cell of the notebook, the report is saved by default as `.html`. E.g. `20210725_193517_dark_pool_AMC.html` -``` -folder = "notebooks/reports/" -extension = ".ipynb" -!jupyter nbconvert {report_name} --to html --no-input -``` + + ```text + folder = "notebooks/reports/" + extension = ".ipynb" + !jupyter nbconvert {report_name} --to html --no-input + ``` 6. You can now write your own personal notes on the notebook. By doing: - * Click on the notebook cell that you are interested in writing your notes - * On the toolbar click on "+" to add a new cell - * On the tooblar click on "Cell" -> "Cell Type" -> "Markdown" - * You're now ready to write your own notes + - Click on the notebook cell that you are interested in writing your notes + - On the toolbar click on "+" to add a new cell + - On the toolbar click on "Cell" -> "Cell Type" -> "Markdown" + - You're now ready to write your own notes 7. Once you're happy with your report, you can either: - * Re-run the last cell, potentially changing output from `.html`: - * Or, on the toolbar click on "File" -> "Download as" -> Select your preferred option (e.g. HTML) + - Re-run the last cell, potentially changing output from `.html`: + - Or, on the toolbar click on "File" -> "Download as" -> Select your preferred option (e.g. HTML) diff --git a/gamestonk_terminal/resources/README.md b/gamestonk_terminal/resources/README.md index a863f0cfd20..849c0d634c8 100644 --- a/gamestonk_terminal/resources/README.md +++ b/gamestonk_terminal/resources/README.md @@ -1,6 +1,7 @@ # RESOURCE COLLECTION -This menu aims to store a collection of useful resources that can't be scraped, or extracted in a "useful" manner, and the usage of the following commands along with an example will be exploited below. +This menu aims to store a collection of useful resources that can't be scraped, or extracted in a "useful" manner, and +the usage of the following commands along with an example will be exploited below. * [hfletters](#hfletters) * hedge fund letters or reports @@ -15,7 +16,6 @@ This menu aims to store a collection of useful resources that can't be scraped, * [learn](#learn) * trading analysis, tips and resources - ## hfletters ```text @@ -25,7 +25,6 @@ usage: hfletters Captura de ecrรฃ 2021-05-01, ร s 21 13 22 Captura de ecrรฃ 2021-05-01, ร s 21 14 08 - ## arxiv ```text @@ -34,7 +33,6 @@ usage: arxiv arxiv - ## finra ```text @@ -43,7 +41,6 @@ usage: finra finra - ## edgar ```text @@ -52,7 +49,6 @@ usage: edgar edgar - ## fred ```text @@ -61,7 +57,6 @@ usage: fred fred - ## learn ```text diff --git a/gamestonk_terminal/stocks/behavioural_analysis/README.md b/gamestonk_terminal/stocks/behavioural_analysis/README.md index 7aabb1f6d75..846331922b2 100644 --- a/gamestonk_terminal/stocks/behavioural_analysis/README.md +++ b/gamestonk_terminal/stocks/behavioural_analysis/README.md @@ -24,4 +24,3 @@ Command|Description|Source `metrics` |core social sentiment metrics for this stock|[Sentiment Investor](https://sentimentinvestor.com) `social` |social media figures for stock popularity|[Sentiment Investor](https://sentimentinvestor.com) `historical` |plot the past week of data for a selected metric|[Sentiment Investor](https://sentimentinvestor.com) - diff --git a/gamestonk_terminal/stocks/dark_pool_shorts/README.md b/gamestonk_terminal/stocks/dark_pool_shorts/README.md index 3c7f4cc5d81..1c0b7545bd7 100644 --- a/gamestonk_terminal/stocks/dark_pool_shorts/README.md +++ b/gamestonk_terminal/stocks/dark_pool_shorts/README.md @@ -2,4 +2,4 @@ Check all features [HERE](https://gamestonkterminal.github.io/GamestonkTerminal/stocks/dark_pool_shorts). -#TODO +**TODO** diff --git a/gamestonk_terminal/stocks/fundamental_analysis/financial_modeling_prep/README.md b/gamestonk_terminal/stocks/fundamental_analysis/financial_modeling_prep/README.md index 88c183556c9..5afe2f8daf9 100644 --- a/gamestonk_terminal/stocks/fundamental_analysis/financial_modeling_prep/README.md +++ b/gamestonk_terminal/stocks/fundamental_analysis/financial_modeling_prep/README.md @@ -2,4 +2,4 @@ Check all features [HERE](https://gamestonkterminal.github.io/GamestonkTerminal/stocks/fundamental_analysis/fmp). -#TODO +**TODO** diff --git a/gamestonk_terminal/stocks/screener/presets/README.md b/gamestonk_terminal/stocks/screener/presets/README.md index 1cdb73020a4..9dea6e724c6 100644 --- a/gamestonk_terminal/stocks/screener/presets/README.md +++ b/gamestonk_terminal/stocks/screener/presets/README.md @@ -24,48 +24,56 @@ 2. There should be a `README.md` file and multiple `.ini` files. One of these `.ini` files should be named `template.ini`. -1 + 1 3. Copy the `template.ini` file and paste it in the same directory. 4. Rename that file to something you find meaningful, e.g. `my_own_filter.ini`. -2 + 2 5. Open the file you just renamed (e.g. `my_own_filter.ini`), and set the parameters you want to filter. -3 + 3 -6. It may be useful to play with the main source https://finviz.com/screener.ashx since you can tweak these and understand how they influence the outcome of the filtered stocks. +6. It may be useful to play with the main source since you can tweak these and + understand how they influence the outcome of the filtered stocks. -4 + 4 7. Update the Author and Description name. E.g. -5 + 5 8. Start the terminal, and go to the `> scr` menu. In there, you can play with it on the terminal as shown: -* **view**: Allows to see the screeners available. I.e. all `.ini` files in presets folder. -6 -* **view **: Allows to see the specific parameters set for the preset selected. -Captura de ecrรฃ 2021-06-28, ร s 23 58 35 + * **view**: Allows to see the screeners available. I.e. all `.ini` files in presets folder. + 6 -* **set **: Allows to set this preset as main filter. See that the help menu will display a different `PRESET: my_own_filter` -7 + * **view **: Allows to see the specific parameters set for the preset selected. + Captura de ecrรฃ 2021-06-28, ร s 23 58 35 -* **historical, overview, valuation, financial, ownership, performance, technical** commands will now be performed on tickers that are filtered with the selected preset. Note: Since it is likely that there will be a big range of tickers, we cap it to 10 randomly. So, it is normal if for the same filter the user sees 10 different tickers. If the user wants to see more than 10 tickers, it can select a different limit using `-l` flag. + * **set **: Allows to set this preset as main filter. See that the help menu will display a different + `PRESET: my_own_filter` + 7 -8 + * **historical, overview, valuation, financial, ownership, performance, technical** commands will now be performed on + tickers that are filtered with the selected preset. Note: Since it is likely that there will be a big range of + tickers, we cap it to 10 randomly. So, it is normal if for the same filter the user sees 10 different tickers. + If the user wants to see more than 10 tickers, it can select a different limit using `-l` flag. -9. Share with other Apes. You can do so by either creating yourself a Pull Request with this change, or asking a dev (e.g. @Sexy_Year) on our discord server to add it for you. + 8 + +9. Share with other Apes. You can do so by either creating yourself a Pull Request with this change, or asking a dev + (e.g. @Sexy_Year) on our discord server to add it for you. --- ## template * **Author of preset:** GamestonkTerminal -* **Contact:** https://github.com/DidierRLopes/GamestonkTerminal#contacts -* **Description:** Template with all available filters and their options menu. More information can be found in https://finviz.com/help/screener.ashx and https://finviz.com/help/technical-analysis/charts-patterns.ashx +* **Contact:** +* **Description:** Template with all available filters and their options menu. More information can be found in + and --- @@ -73,7 +81,8 @@ * **Author of preset:** Sexy Year * **Contact:** Add contact of author, if (s)he whishes to be contacted. This can be an hyperlink, an e-mail, wtv -* **Description:** This is just a sample. The user that adds the preset can add a description for what type of stocks these filters are aimed for +* **Description:** This is just a sample. The user that adds the preset can add a description for what type of stocks + these filters are aimed for --- @@ -114,7 +123,7 @@ * **Author of preset:** Traceabl3 * **Contact:** take the red pill * **Description:** Death cross : when the 50sma crosses below the 200 sma -* **More information:** https://www.investopedia.com/terms/d/deathcross.asp +* **More information:** --- @@ -135,6 +144,7 @@ --- ## modified_dreman + * **Author of preset:** Traceabl3 * **Contact:** Drum Telegraphy * **Description:** Modified Version of the Dreman Screener. @@ -146,7 +156,7 @@ * **Author of preset:** Traceabl3 * **Contact:** bang the drums * **Description:** Neff Screener with modifications // operational margin <50% -* **More information:** https://marketxls.com/template/neff-screen/ +* **More information:** ---