liberethos_paradigm/tools/gen_brokerage_table.sh

184 lines
11 KiB
Bash
Executable file

#!/bin/bash
typeset -r db_file=$(mktemp --dry-run --suffix=.db)
table_populate()
{
# insert into brkrTbl (name,notes) values ("Evertrade","Where's the website? Sold to TIAA-CREF?");
sqlite3 "${db_file}" <<'EOF'
create table if not exists brkrTbl (name text primary key not null,
url text,
blacklisted boolean default 0,
cflogin boolean default 0,
aws boolean default 0,
cispa boolean default 0,
alec boolean default 0,
dt boolean default 0,
notes text);
insert into brkrTbl (name,url,aws,notes) values ("Janus Henderson","https://www.janushenderson.com",1,"");
insert into brkrTbl (name,url,dt,notes) values ("Vanguard","https://investor.vanguard.com",1,"");
insert into brkrTbl (name,url,notes) values ("Rich Uncles","https://richuncles.com","Real estate investing only");
insert into brkrTbl (name,url,aws,notes) values
("Stash","https://stash.com",1,
"no mutual funds; no options; no crypto; maintenance fee: $1/month");
insert into brkrTbl (name,url,aws,notes) values
("nvstr","https://www.nvstr.com",1,
"maintenance fee: $4/month; promos: $15-150 for funding, random bonus awards, referral bonuses");
insert into brkrTbl (name,url,aws,notes) values
("tastyworks","https://tastyworks.com",1,
"TIRA; RIRA; no forex; no crypto; no non-US stocks; open/close fee= $0/0; commission=$5/stock trade (closing trades gratis), $1/option trade; promo: funding (100 shares [$1-6ea, avg:$200-220]), referral=$75");
insert into brkrTbl (name,url,aws,notes) values
("Webull","https://www.webull.com",1,"TIRA; RIRA; crypto; no forex");
insert into brkrTbl (name,url,aws,notes) values
("TradeStation","https://www.tradestation.com",1,
"crypto; min. invest=$500 ($2k for bonus); open/close fee= $0/0; commission=$0.50/option trade; commission=$0-5/stock trade");
insert into brkrTbl (name,url,cispa,notes) values
("E*Trade","https://us.etrade.com",1,
"covers: Canada, France, Germany, Hong Kong, Japan, United Kingdom, and United States; funding bonus ($5k=>$50; $10k=>$100; $20k=>$150)");
insert into brkrTbl (name,url,notes) values
("Greenvest","https://greenvest.com",
"RIRA; min. investment to avoid fees: $100k; [B corp](https://bcorporation.net/directory/greenvest)");
insert into brkrTbl (name,url,aws,notes) values
("Robinhood","https://robinhood.com/us/en/",1,"[Fined $65M](https://nypost.com/2020/12/17/sec-slaps-robinhood-app-with-65m-fine-for-misleading-users) for misleading users; They may have used CloudFlare in the past but apparently that changed");
insert into brkrTbl (name,url,notes) values
("InteractiveBrokers","https://interactivebrokers.com",
"min. investment to avoid fees: $100k per account; has a ""impact"" feature to analyze the portfolio's ESG factors w.r.t. the user's ethical views; covers Australia, Belgium, Canada, France, Germany, Hong Kong, Italy, Japan, Mexico, Netherlands, Singapore, South Korea, Spain, Sweden, Switzerland, United Kingdom, and United States; website is **partially Tor-hostile** but the site can be avoided for most operations after sign-up");
insert into brkrTbl (name,url,blacklisted,notes) values
("TD Ameritrade","https://www.tdameritrade.com",1,
"Majority owned by Charles Schwab, a firm that [supports](us_banks.md) republicans, CISPA, drug tests their staff, and treats Tor users with hostility (but note that TDA functions over Tor). Schwab outsources banking operations to PNC bank, which is [quite evil](us_banks.md); [Uses MS Github to host s/w](https://github.com/TDAmeritrade/stumpy)");
insert into brkrTbl (name,url,blacklisted,aws,notes) values ("Fundrise","https://fundrise.com",1,1,"Unavoidable CAPTCHAs");
insert into brkrTbl (name,url,blacklisted,aws,cispa,alec,dt) values ("Prudential","https://www.prudential.com",1,1,1,1,1);
insert into brkrTbl (name,url,blacklisted,cflogin,aws) values ("Ellevest","https://www.ellevest.com",1,1,1);
insert into brkrTbl (name,url,blacklisted,cflogin) values ("Euro Pacific Capital","https://europacbank.com",1,1);
insert into brkrTbl (name,url,blacklisted,cflogin) values ("Zackstrade","https://zackstrade.com",1,1);
insert into brkrTbl (name,url,blacklisted,cflogin) values ("Stockpile","https://www.stockpile.com",1,1);
insert into brkrTbl (name,url,blacklisted,cflogin) values ("Tradingblock","https://tradingblock.com",1,1);
insert into brkrTbl (name,url,blacklisted,cflogin) values ("Wealthsimple","https://wealthsimple.com",1,1);
insert into brkrTbl (name,url,notes) values
("Finhabits","https://www.finhabits.com",
"[B corp](https://bcorporation.net/directory/finhabits); Hosted on Google Cloud; outsources to Apex; uses Equifax for address verification");
insert into brkrTbl (name,url,blacklisted,notes) values
("Wealthfront","https://www.wealthfront.com",1,"Registration imposes Google reCAPTCHA; [caught](https://www.jpost.com/Breaking-News/US-regulator-sanctions-robo-advisers-Wealthfront-Hedgeable-on-false-disclosures-575044) making false disclosures and [charged](https://www.eastbaytimes.com/2018/12/21/bay-area-robo-adviser-firm-wealthfront-charged-by-sec-with-false-advertising) for false advertising.");
insert into brkrTbl (name,url,blacklisted,cflogin,aws,notes) values
("Axos Invest","https://www.axosinvest.com",1,1,1,
"Axos Bank is jailed in CloudFlare and Axos Invest will be soon. Investors who get blocked by that will have to pay $5/month for paper statements.");
insert into brkrTbl (name,url,blacklisted,notes) values
("Firstrade","https://firstrade.com",1,"whole site is Tor-hostile (468 error)");
insert into brkrTbl (name,url,blacklisted,notes) values
("TIAA-CREF","https://tiaa-cref.org",1,"Whole site is Tor-hostile");
insert into brkrTbl (name,url,blacklisted,cispa,notes) values
("Ally","http://www.ally.com/",1,1,"whole site is Tor-hostile (403 error)");
insert into brkrTbl (name,url,blacklisted,cflogin,notes) values
("SoFi","https://sofi.com/",1,1,
"They censor posts in their Reddit sub that expose the risks of passing sensitive financial data through CloudFlare; also [caught](https://www.ftc.gov/news-events/press-releases/2018/10/online-student-loan-refinance-company-sofi-settles-ftc-charges) in a deceptive advertizing scandal.");
insert into brkrTbl (name,url,blacklisted,cflogin,notes) values
("M1 Finance","https://www.m1finance.com",1,1,
"They censor posts in their Reddit sub that expose the risks of passing sensitive financial data through CloudFlare.");
insert into brkrTbl (name,url,blacklisted,cflogin,notes) values ("Lightspeed","https://www.lightspeed.com",1,1,"");
insert into brkrTbl (name,url,blacklisted,notes) values
("Betterment","https://www.betterment.com",1,
"Imposes hCAPTCHA just to read the landing page. They censor posts in their Reddit sub that complains about this instead of offering support.");
insert into brkrTbl (name,url,blacklisted,cflogin,notes) values ("Siebert","https://www.siebert.com",1,1,"");
insert into brkrTbl (name,url,blacklisted,dt,notes) values
("Merrill Edge","https://www.merrilledge.com/",1,1,
"Owned by one of the [most evil](us_banks.md) banks in the world (Bank of America)");
insert into brkrTbl (name,url,blacklisted,cispa,dt,notes) values
("Wellstrade","https://wellstrade",1,1,1,"Owned by Wells Fargo, an [evil](us_banks.md) bank.");
insert into brkrTbl (name,url,blacklisted,cflogin,notes) values
("Sogotrade","https://sogotrade.com",1,1,"");
insert into brkrTbl (name,url,blacklisted,notes) values
("FUTU","fututrade.com",1,
"support.fututrade.com is CloudFlared; no web app; mobile app is GPS-iOS-only; desktop is Mac/Windows only");
insert into brkrTbl (name,url,blacklisted,notes) values
("Gatsby","trygatsby.com",1,"no web app; no desktop app; mobile app is GPS-iOS-only");
EOF
};#table_populate
gen_md()
{
#local red_circle='🔴'
local red_circle=$'\xF0\x9F\x94\xB4'
#local green_circle='🟢'
local green_circle=$'\xf0\x9f\x9f\xa2'
#local test_tube='🧪'
local test_tube=$'\xf0\x9f\xa7\xaa'
#local cloud_lightening='🌩'
local cloud_lightening=$'\xf0\x9f\x8c\xa9'
#local detective='🕵'
local detective=$'\xf0\x9f\x95\xb5'
#local okhand='👌'
local okhand=$'\xF0\x9F\x91\x8C'
printf '\n%s\n' '# Whitelist'
printf %s '| *brokerage* | *ALEC member* | *sensitive info exposed to CloudFlare* | *supported CISPA* | *forced drug testing of staff* | *notes* |
|---|---|---|---|---|---|
'
sqlite3 "${db_file}" "select case when url like '_%' then '|['||name||']('||url||')' else '|'||name end,
case when alec then '$okhand' else 'n' end,
case when cflogin then 'y' else 'n' end,
case when cispa then 'y' else 'n' end,
case when dt then 'y' else 'n' end,
notes||'|'
from brkrTbl where not blacklisted and not aws and not dt and not cispa
and not notes like '%tor_hostile%' and not notes like '%equifax%' order by name collate nocase;"
printf '\n%s\n' '# Graylist'
printf %s '| *brokerage* | *ALEC member* | *sensitive info exposed to CloudFlare* | *supported CISPA* | *forced drug testing of staff* | *notes* |
|---|---|---|---|---|---|
'
sqlite3 "${db_file}" "select '|['||name||']('||url||')',
case when alec then '$okhand' else 'n' end,
case when cflogin then 'y' else 'n' end,
case when cispa then '$detective' else 'n' end,
case when dt then '$test_tube' else 'n' end,
case when aws then '**Amazon AWS-hosted**; ' else '' end
||notes||'|'
from brkrTbl where (aws or dt or cispa or notes like '%tor_hostile%' or
notes like '%equifax%') and not blacklisted order by name collate nocase;"
printf '\n%s\n' '# Blacklist'
printf %s '| *brokerage* | *ALEC member* | *sensitive info exposed to CloudFlare* | *supported CISPA* | *forced drug testing of staff* | *notes* |
|---|---|---|---|---|---|
'
sqlite3 "${db_file}" "select '|'||name,
case when alec then '$okhand' else 'n' end,
case when cflogin then '$cloud_lightening' else 'n' end,
case when cispa then '$detective' else 'n' end,
case when dt then '$test_tube' else 'n' end,
case when aws then 'Amazon AWS-hosted; ' else '' end
||notes||'|'
from brkrTbl where blacklisted order by name collate nocase;"
};#gen_md
table_populate
gen_md