Files
OpenBB/openbb_terminal/mutual_funds/mutual_funds_utils.py
Mael_Jourdain 7175d0fa8f Feature/mstarpy (#4068)
* add mstarpy to new terminal version

* add mstarpy to new terminal version

* add mstarpy with poetry

* mapping country openbb convention and mstarpy iso

* empty dataframe if no assets

* remove investing command

* plot with parameters

* change source

* mstarpy in pyproject

* chnage poetry

* change poetry

* mstarpy key

* reformat with black

* spelling instantiated

* correct instantiate

* delete fo to pass codespell test

* correction flake8 test

* correction test mypy

* correction pylint

* pass mypy test

* correction test pylint

* remove mutable default value

* delete equity, comment, add sweden menu

* delete not used EXPORT_ONLY_RAW_DATA_ALLOWED

* delete not used investpy and yfinance view

* mstarpy 0.0.2

* minor changes to user msgs

* added countries to autocompletion

* hinting

* small change on load

* adjustments and deprecating investpy

* minor adjustment to also load country on reset

* removing forecasting as self.data is not popullated

* adjustments on sector

* minor adjustments

* fix tests

* fix tests

* improved swe functions

* plot display Nav

* united_states as default country

* mstarpy version 0.0.4

* adjustments

* dependencies

---------

Co-authored-by: James Maslek <jmaslek11@gmail.com>
Co-authored-by: Henrique Joaquim <h.joaquim@campus.fct.unl.pt>
2023-02-03 13:28:31 +00:00

251 lines
5.9 KiB
Python

mapping_country = {
"afghanistan": "af",
"åland_islands": "ax",
"albania": "al",
"algeria": "dz",
"american_samoa": "as",
"andorra": "ad",
"angola": "ao",
"anguilla": "ai",
"antarctica": "aq",
"antigua_and_barbuda": "ag",
"argentina": "ar",
"armenia": "am",
"aruba": "aw",
"australia": "au",
"austria": "at",
"azerbaijan": "az",
"bahamas": "bs",
"bahrain": "bh",
"bangladesh": "bd",
"barbados": "bb",
"belarus": "by",
"belgium": "be",
"belize": "bz",
"benin": "bj",
"bermuda": "bm",
"bhutan": "bt",
"bolivia": "bo",
"bonaire": "bq",
"bosnia_and_herzegovina": "ba",
"botswana": "bw",
"bouvet_island": "bv",
"brazil": "br",
"british_indian_ocean_territory": "io",
"brunei_darussalam": "bn",
"bulgaria": "bg",
"burkina_faso": "bf",
"burundi": "bi",
"cabo_verde": "cv",
"cambodia": "kh",
"cameroon": "cm",
"canada": "ca",
"cayman_islands": "ky",
"central_african_republic": "cf",
"chad": "td",
"chile": "cl",
"china": "cn",
"christmas_island": "cx",
"cocos_(keeling)_islands": "cc",
"colombia": "co",
"comoros": "km",
"congo_(the_democratic_republic_of_the)": "cd",
"congo_(the)": "cg",
"cook_islands": "ck",
"costa_rica": "cr",
"cote_divoire": "ci",
"croatia": "hr",
"cuba": "cu",
"curaçao": "cw",
"cyprus": "cy",
"czechia": "cz",
"denmark": "dk",
"djibouti": "dj",
"dominica": "dm",
"dominican_republic": "do",
"ecuador": "ec",
"egypt": "eg",
"el_salvador": "sv",
"equatorial_guinea": "gq",
"eritrea": "er",
"estonia": "ee",
"eswatini": "sz",
"ethiopia": "et",
"falkland_islands": "fk",
"fiji": "fj",
"finland": "fi",
"france": "fr",
"french_guiana": "gf",
"french_polynesia": "pf",
"french_southern_territories": "tf",
"gabon": "ga",
"gambia": "gm",
"georgia": "ge",
"germany": "de",
"ghana": "gh",
"gibraltar": "gi",
"greece": "gr",
"greenland": "gl",
"grenada": "gd",
"guadeloupe": "gp",
"guam": "gu",
"guatemala": "gt",
"guernsey": "gg",
"guinea": "gn",
"guinea-bissau": "gw",
"guyana": "gy",
"haiti": "ht",
"heard_island_and_mcdonald_islands": "hm",
"holy_see": "va",
"honduras": "hn",
"hong_kong": "hk",
"hungary": "hu",
"iceland": "is",
"india": "in",
"indonesia": "id",
"iran": "ir",
"iraq": "iq",
"ireland": "ie",
"isle_of_man": "im",
"israel": "il",
"italy": "it",
"jamaica": "jm",
"japan": "jp",
"jersey": "je",
"jordan": "jo",
"kazakhstan": "kz",
"kenya": "ke",
"kiribati": "ki",
"korea_(the_democratic_peoples_republic_of)": "kp",
"korea_(the_republic_of)": "kr",
"kuwait": "kw",
"kyrgyzstan": "kg",
"lao_peoples_democratic_republic": "la",
"latvia": "lv",
"lebanon": "lb",
"lesotho": "ls",
"liberia": "lr",
"libya": "ly",
"liechtenstein": "li",
"lithuania": "lt",
"luxembourg": "lu",
"macao": "mo",
"north_macedonia": "mk",
"madagascar": "mg",
"malawi": "mw",
"malaysia": "my",
"maldives": "mv",
"mali": "ml",
"malta": "mt",
"marshall_islands": "mh",
"martinique": "mq",
"mauritania": "mr",
"mauritius": "mu",
"mayotte": "yt",
"mexico": "mx",
"micronesia": "fm",
"moldova": "md",
"monaco": "mc",
"mongolia": "mn",
"montenegro": "me",
"montserrat": "ms",
"morocco": "ma",
"mozambique": "mz",
"myanmar": "mm",
"namibia": "na",
"nauru": "nr",
"nepal": "np",
"netherlands": "nl",
"new_caledonia": "nc",
"new_zealand": "nz",
"nicaragua": "ni",
"niger": "ne",
"nigeria": "ng",
"niue": "nu",
"norfolk_island": "nf",
"northern_mariana_islands": "mp",
"norway": "no",
"oman": "om",
"pakistan": "pk",
"palau": "pw",
"palestine": "ps",
"panama": "pa",
"papua_new_guinea": "pg",
"paraguay": "py",
"peru": "pe",
"philippines": "ph",
"pitcairn": "pn",
"poland": "pl",
"portugal": "pt",
"puerto_rico": "pr",
"qatar": "qa",
"réunion": "re",
"romania": "ro",
"russian_federation": "ru",
"rwanda": "rw",
"saint_barthélemy": "bl",
"saint_helena": "sh",
"saint_kitts_and_nevis": "kn",
"saint_lucia": "lc",
"saint_martin_(french_part)": "mf",
"saint_pierre_and_miquelon": "pm",
"saint_vincent_and_the_grenadines": "vc",
"samoa": "ws",
"san_marino": "sm",
"sao_tome_and_principe": "st",
"saudi_arabia": "sa",
"senegal": "sn",
"serbia": "rs",
"seychelles": "sc",
"sierra_leone": "sl",
"singapore": "sg",
"sint_maarten_(dutch_part)": "sx",
"slovakia": "sk",
"slovenia": "si",
"solomon_islands": "sb",
"somalia": "so",
"south_africa": "za",
"south_georgia_and_the_south_sandwich_islands": "gs",
"south_sudan": "ss",
"spain": "es",
"sri_lanka": "lk",
"sudan": "sd",
"suriname": "sr",
"svalbard": "sj",
"sweden": "se",
"switzerland": "ch",
"syrian_arab_republic": "sy",
"taiwan": "tw",
"tajikistan": "tj",
"tanzania": "tz",
"thailand": "th",
"timor-leste": "tl",
"togo": "tg",
"tokelau": "tk",
"tonga": "to",
"trinidad_and_tobago": "tt",
"tunisia": "tn",
"türkiye": "tr",
"turkmenistan": "tm",
"turks_and_caicos_islands": "tc",
"tuvalu": "tv",
"uganda": "ug",
"ukraine": "ua",
"united_arab_emirates": "ae",
"united_kingdom": "gb",
"united_states_minor_outlying_islands": "um",
"united_states": "us",
"uruguay": "uy",
"uzbekistan": "uz",
"vanuatu": "vu",
"venezuela": "ve",
"viet_nam": "vn",
"virgin_islands_(british)": "vg",
"virgin_islands_(u.s.)": "vi",
"wallis_and_futuna": "wf",
"western_sahara": "eh",
"yemen": "ye",
"zambia": "zm",
"zimbabwe": "zw",
}