diff --git a/README.md b/README.md index 2c7e38f..bc4dd09 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ After conversion, this [step-by-step guide](./guide/README.md) creates a new por
Guide step 100
After importing the converted example CSV
diff --git a/convert.py b/convert.py index d6a564a..121ca80 100755 --- a/convert.py +++ b/convert.py @@ -33,8 +33,9 @@ # A Charles Scwab CSV starts with a prefix and a suffix row -# Prefix: "Transactions for account... +# Prefix: "Transactions for account..." # Suffix: "Transactions Total" +# They are ignored. df = pd.read_csv(args.schwab_csv, skiprows=1, skipfooter=1, engine="python") # Convert dates to datetime objects @@ -70,6 +71,13 @@ def remove_currency(text: str): df["Transaction Currency"] = transaction_currency # Convert Action to Type +""" +"Deposit/Removal (or withdrawal): Depositing or withdrawing funds will +respectively increase or decrease the value of a deposit account." +Ref: https://help.portfolio-performance.info/en/reference/transaction/ + +So a Schwab "Wire Sent" is a PP "Removal". +""" action_to_type = { "NRA Tax Adj": "Taxes", "Credit Interest": "Interest", @@ -80,6 +88,7 @@ def remove_currency(text: str): "Buy": "Buy", "Sell": "Sell", "Wire Received": "Deposit", + "Wire Sent": "Removal", "Advisor Fee": "Fees", "Reinvest Dividend": "Dividend", "Reinvest Shares": "Buy", @@ -105,6 +114,8 @@ def convert_security_name(data: str): return "" elif data.startswith("WIRED FUNDS RECEIVED"): return "" + elif data.startswith("WIRED FUNDS DISBURSED"): + return "" else: return data diff --git a/example.csv b/example.csv index 544ae68..8b679e0 100644 --- a/example.csv +++ b/example.csv @@ -1,5 +1,6 @@ "Transactions for account ...000 as of 09/27/2022 02:03:53 AM ET" "Date","Action","Symbol","Description","Quantity","Price","Fees & Comm","Amount" +"01/01/2024","Wire Sent","","WIRED FUNDS DISBURSED","","","","-$100.00" "12/29/2021","NRA Withholding","BNDX","VANGUARD TOTAL INTERNATIONAL BND ETF","","","","-$0.14" "12/29/2021","Short Term Cap Gain","BNDX","VANGUARD TOTAL INTERNATIONAL BND ETF","","","","$0.48" "12/29/2021","Long Term Cap Gain","BNDX","VANGUARD TOTAL INTERNATIONAL BND ETF","","","","$29.21" diff --git a/example_out.csv b/example_out.csv index 40b5bac..1d4a306 100644 --- a/example_out.csv +++ b/example_out.csv @@ -1,4 +1,5 @@ Date,Note,Ticker Symbol,Security Name,Shares,Fees,Value,Transaction Currency,Type +2024-01-01,Wire Sent,,,,,-100.00,USD,Removal 2021-12-29,NRA Withholding,BNDX,VANGUARD TOTAL INTERNATIONAL BND ETF,,,-0.14,USD,Taxes 2021-12-29,Short Term Cap Gain,BNDX,VANGUARD TOTAL INTERNATIONAL BND ETF,,,0.48,USD,Dividend 2021-12-29,Long Term Cap Gain,BNDX,VANGUARD TOTAL INTERNATIONAL BND ETF,,,29.21,USD,Dividend diff --git a/guide/README.md b/guide/README.md index babb5ac..c7cdf89 100644 --- a/guide/README.md +++ b/guide/README.md @@ -1,6 +1,6 @@ # A step-by-step guide -This guide will create a new portfolio file in Portfolio Performance (PP) and import a converted CSV file. +This guide will create a new portfolio file in Portfolio Performance (PP) and import a converted CSV file. Screen capturse are from PP 0.71.2 (October 2024). 1. Download a transcations CSV file from your Charles Schwab account, say, ```example.csv```. 2. Convert the CSV. [README](../README.md) for convert.py. @@ -11,60 +11,61 @@ python3 convert.py example.csv -p example_out.csv 3. Open Portfolio Performance and click on "Create a new file". -![Create a new file](img/010.jpg "Click on Create a new file") +![Create a new file](img/010.png "Click on Create a new file") 4. Select "USD (United States Dollar)" for currency. -![USD (United States Dollar)](img/020.jpg "Select 'USD (United States Dollar)' for currency.") +![USD (United States Dollar)](img/020.png "Select 'USD (United States Dollar)' for currency.") 5. Type "Securities" for Securities Account and "Deposit" for Reference Account. Then click on "Add" button. -![Securities and Deposit accounts](img/030.jpg) +![Securities and Deposit accounts](img/030.png) 6. Click on "Finish" button. -![Finish](img/040.jpg) +![Clikd on Finish](img/040.png) 7. Import the converted CSV. Go to File menu, Import, CSV files (comma-seperated values) and select ```example_out.csv```. -![Setup online retirieval of securities quotes](img/050.jpg) +![File menu, Import, CSV files](img/050.png) 8. Click on "Next" button. -![Click on "Next" button](img/060.jpg) +![Click on "Next" button](img/060.png) 9. Note that "Deposit" is chosen as the Cash Account and "Securities" as the Securities Account. These two names where entered in a previous step. Click on "Finish" button. -![Click on "Finish" button](img/070.jpg) +![Click on "Finish" button](img/070.png) -10. Now we are going to setup online retrieval of securities quotes for the securities in the account. +10. Click on "OK" button. - 1. To have online quotes, we need to access an online service via its API key. FinnHub, among others, are supported by PP. Create an account on [Finnhub](https://finnhub.io/) and get your API key. +![Click on "OK" button](img/080.png) - 2. Enter this API key at Preferences, API Keys, Finnhub, Finnhub API Key. You only need to enter an API key once. New portfolio files created in PP will be able to use it. - - ![Finnhub API key](img/080.jpg) - -11. Now we are going to activate online quotes for securities that exist in the account. +11. Now we are going to retrieve historial quotes for securities that exist in the account. 1. Select "All Securities" from the tree menu on the left panel. - ![Select "All Securities"](img/090.jpg) + ![Select "All Securities"](img/090.png) 2. Right click on "VANGUARD TOTAL INTERNATIONAL BND ETF" and choose "Edit". - ![Right click and choose Edit](img/091.jpg) + ![Right click and choose Edit](img/091.png) 3. Select "Historical Quotes" tab. - ![Select Historical Quotes tab](img/092.jpg) + ![Select Historical Quotes tab](img/092.png) + + 4. Choose "Yahoo" from the Provider dropdown list. + + ![Choose Yahoo from the Provider dropdown list](img/093.png) - 4. Choose "Finnhub" from the Provider drop list. Historical prices will then be retrieved. Then click on "OK" button. + 5. Historical quotes will be retrieved. Then click on "OK" button. - ![Choose Finnhub from the Provider drop list](img/093.jpg) + ![Historical quotes retrieved](img/094.png) + ![Chart of historical quotes](img/095.png) - 5. Repeat this for other securities in the account. Note that this only needs to be done once for each new securities in the account. For example, repeat this when a new security is purchased. PP will retrieve historical prices automatically or you can manually do so via Online menu, Update Quotes. + 6. Repeat this for other securities in the account. Note that this only needs to be done once for each new securities in the account. For example, repeat this when a new security is purchased. PP will retrieve historical quotes automatically or you can manually do so via Online menu, Update Quotes. 12. Verify. Select "All transcations" from the tree menu on the left panel. Import complete. -![Select All transactions](img/100.jpg) +![Select All transactions](img/100.png) diff --git a/guide/img/010.jpg b/guide/img/010.jpg deleted file mode 100644 index 1cc5d05..0000000 Binary files a/guide/img/010.jpg and /dev/null differ diff --git a/guide/img/010.png b/guide/img/010.png new file mode 100644 index 0000000..634e564 Binary files /dev/null and b/guide/img/010.png differ diff --git a/guide/img/020.jpg b/guide/img/020.jpg deleted file mode 100644 index 3c540fb..0000000 Binary files a/guide/img/020.jpg and /dev/null differ diff --git a/guide/img/020.png b/guide/img/020.png new file mode 100644 index 0000000..c944b4f Binary files /dev/null and b/guide/img/020.png differ diff --git a/guide/img/030.jpg b/guide/img/030.jpg deleted file mode 100644 index 52b4d13..0000000 Binary files a/guide/img/030.jpg and /dev/null differ diff --git a/guide/img/030.png b/guide/img/030.png new file mode 100644 index 0000000..d5cd18e Binary files /dev/null and b/guide/img/030.png differ diff --git a/guide/img/040.jpg b/guide/img/040.jpg deleted file mode 100644 index b902fa4..0000000 Binary files a/guide/img/040.jpg and /dev/null differ diff --git a/guide/img/040.png b/guide/img/040.png new file mode 100644 index 0000000..f0ffe29 Binary files /dev/null and b/guide/img/040.png differ diff --git a/guide/img/041.png b/guide/img/041.png new file mode 100644 index 0000000..6451e5c Binary files /dev/null and b/guide/img/041.png differ diff --git a/guide/img/050.jpg b/guide/img/050.jpg deleted file mode 100644 index 9565caa..0000000 Binary files a/guide/img/050.jpg and /dev/null differ diff --git a/guide/img/050.png b/guide/img/050.png new file mode 100644 index 0000000..990e627 Binary files /dev/null and b/guide/img/050.png differ diff --git a/guide/img/060.jpg b/guide/img/060.jpg deleted file mode 100644 index 5d7e3fa..0000000 Binary files a/guide/img/060.jpg and /dev/null differ diff --git a/guide/img/060.png b/guide/img/060.png new file mode 100644 index 0000000..45ab836 Binary files /dev/null and b/guide/img/060.png differ diff --git a/guide/img/070.jpg b/guide/img/070.jpg deleted file mode 100644 index ac59bd5..0000000 Binary files a/guide/img/070.jpg and /dev/null differ diff --git a/guide/img/070.png b/guide/img/070.png new file mode 100644 index 0000000..d9395ca Binary files /dev/null and b/guide/img/070.png differ diff --git a/guide/img/080.jpg b/guide/img/080.jpg deleted file mode 100644 index 29fbae1..0000000 Binary files a/guide/img/080.jpg and /dev/null differ diff --git a/guide/img/080.png b/guide/img/080.png new file mode 100644 index 0000000..a369cbf Binary files /dev/null and b/guide/img/080.png differ diff --git a/guide/img/090.jpg b/guide/img/090.jpg deleted file mode 100644 index 8c0bdfb..0000000 Binary files a/guide/img/090.jpg and /dev/null differ diff --git a/guide/img/090.png b/guide/img/090.png new file mode 100644 index 0000000..45fb71f Binary files /dev/null and b/guide/img/090.png differ diff --git a/guide/img/091.jpg b/guide/img/091.jpg deleted file mode 100644 index 0a36d3d..0000000 Binary files a/guide/img/091.jpg and /dev/null differ diff --git a/guide/img/091.png b/guide/img/091.png new file mode 100644 index 0000000..97ceee9 Binary files /dev/null and b/guide/img/091.png differ diff --git a/guide/img/092.jpg b/guide/img/092.jpg deleted file mode 100644 index 821660e..0000000 Binary files a/guide/img/092.jpg and /dev/null differ diff --git a/guide/img/092.png b/guide/img/092.png new file mode 100644 index 0000000..a492f31 Binary files /dev/null and b/guide/img/092.png differ diff --git a/guide/img/093.jpg b/guide/img/093.jpg deleted file mode 100644 index 015b409..0000000 Binary files a/guide/img/093.jpg and /dev/null differ diff --git a/guide/img/093.png b/guide/img/093.png new file mode 100644 index 0000000..7025326 Binary files /dev/null and b/guide/img/093.png differ diff --git a/guide/img/094.png b/guide/img/094.png new file mode 100644 index 0000000..3b8dbd2 Binary files /dev/null and b/guide/img/094.png differ diff --git a/guide/img/095.png b/guide/img/095.png new file mode 100644 index 0000000..3113629 Binary files /dev/null and b/guide/img/095.png differ diff --git a/guide/img/100.jpg b/guide/img/100.jpg deleted file mode 100644 index e56c2d1..0000000 Binary files a/guide/img/100.jpg and /dev/null differ diff --git a/guide/img/100.png b/guide/img/100.png new file mode 100644 index 0000000..182087b Binary files /dev/null and b/guide/img/100.png differ