Re: Capital gain records
> "lf" == lipp f writes: lf> Sorry, my question was if there is a way to automate this. I have more lf> than 2000 transactions and doing that manually is not really an option. I see, I wrote a Haskell program to generate these entries from a CSV file. I don’t know of any automation that wouldn’t involve some coding. John -- --- You received this message because you are subscribed to the Google Groups "Ledger" group. To unsubscribe from this group and stop receiving emails from it, send an email to ledger-cli+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ledger-cli/m2o7esgfpb.fsf%40newartisans.com.
Re: Capital gain records
Sorry, my question was if there is a way to automate this. I have more than 2000 transactions and doing that manually is not really an option. On Thursday, December 14, 2023 at 8:39:32 PM UTC-5 John Wiegley wrote: > > "lf" == lipp f writes: > > lf> I'm importing all transactions from my broker. They are buy / sell > lf> securities. Is there a easy way to create the capital gain records? > > For purchases, just to be sure to record the price at purchase of the late. > > For sales, you need to record the price of the lot along with the price of > the > sale, which will create an need for Ledger to balance the gain or less. > > Here’s a real example: > > 2021/01/29 * BOT +100 AMC @13.00 > Assets:TD:Brokerage:Equities 100 AMC @ $13.00 > Assets:TD:Brokerage:Cash $-1,300.00 > > 2021/02/01 * SOLD -100 AMC @14.00 > (Expenses:TD:Fees) $0.04 > Income:Capital:Short $-99.96 > Assets:TD:Brokerage:Equities -100 AMC {$13.00} @ $14.00 > Assets:TD:Brokerage:Cash $1,399.96 > > John > -- --- You received this message because you are subscribed to the Google Groups "Ledger" group. To unsubscribe from this group and stop receiving emails from it, send an email to ledger-cli+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ledger-cli/a6b62d17-0231-4cc4-bacc-485f4e460d3en%40googlegroups.com.
Re: Capital gain records
> "lf" == lipp f writes: lf> I'm importing all transactions from my broker. They are buy / sell lf> securities. Is there a easy way to create the capital gain records? For purchases, just to be sure to record the price at purchase of the late. For sales, you need to record the price of the lot along with the price of the sale, which will create an need for Ledger to balance the gain or less. Here’s a real example: 2021/01/29 * BOT +100 AMC @13.00 Assets:TD:Brokerage:Equities 100 AMC @ $13.00 Assets:TD:Brokerage:Cash $-1,300.00 2021/02/01 * SOLD -100 AMC @14.00 (Expenses:TD:Fees) $0.04 Income:Capital:Short $-99.96 Assets:TD:Brokerage:Equities-100 AMC {$13.00} @ $14.00 Assets:TD:Brokerage:Cash $1,399.96 John -- --- You received this message because you are subscribed to the Google Groups "Ledger" group. To unsubscribe from this group and stop receiving emails from it, send an email to ledger-cli+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ledger-cli/m25y10b5wy.fsf%40newartisans.com.
Re: building python package
Hi, CMake is quite explicit about which python it has found: -- Found Python: /home/sergiu/miniconda3/envs/invest_01/bin/python3.9 This does not match with the 3.8 that is in your environment. In order to build Ledger Python correctly the Python found by CMake must match the Python that boost was compiled with (typically system Python). I'd try to avoid using venv or conda and stick with the system Python. I've been working on and off on adding support to make Ledger installable via pip (see https://github.com/ledger/ledger/pull/2246) but it may be a while until that is finished completely. Hope this helps :) -- --- You received this message because you are subscribed to the Google Groups "Ledger" group. To unsubscribe from this group and stop receiving emails from it, send an email to ledger-cli+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ledger-cli/6pi2yv4hhaqnwo52pfj6frzblwf3232izwzkmmkhhbv4svholv%40sloseahq5l2p.
Re: building python package
$ cat /etc/issue Ubuntu 20.04.6 LTS \n \l -- --- You received this message because you are subscribed to the Google Groups "Ledger" group. To unsubscribe from this group and stop receiving emails from it, send an email to ledger-cli+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ledger-cli/f2a1ef44-8b60-43c4-ba3e-bd1fa4374cfdn%40googlegroups.com.
Re: building python package
$ python -V Python 3.8.18 On Thursday, December 14, 2023 at 4:20:24 PM UTC-5 lipp f wrote: > I've done this: > $ conda create -n ldg-build python=3.8 boost py-boost zlib > > $ ./acprep dependencies > ... > 0 upgraded, 0 newly installed, 0 to remove and 132 not upgraded. > > $ cmake -Bbuild -S. -DUSE_PYTHON:BOOL=ON^C > -- Found Python: /home/sergiu/miniconda3/envs/invest_01/bin/python3.9 > (found version "3.9.16") found components: Interpreter > -- Found Python: /home/sergiu/miniconda3/envs/invest_01/bin/python3.9 > (found version "3.9.16") found components: Interpreter Development > > CMake Error at > /usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake:117 > (find_package): > Found package configuration file: > > > /usr/lib/x86_64-linux-gnu/cmake/boost_python-1.71.0/boost_python-config.cmake > > but it set boost_python_FOUND to FALSE so package "boost_python" is > considered to be NOT FOUND. Reason given by package: > > No suitable build variant has been found. > > The following variants have been tried and rejected: > > * libboost_python38.so.1.71.0 (3.8, Boost_PYTHON_VERSION=3.9) > > * libboost_python38.a (3.8, Boost_PYTHON_VERSION=3.9) > > Call Stack (most recent call first): > /usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake:182 > (boost_find_component) > /usr/share/cmake-3.16/Modules/FindBoost.cmake:443 (find_package) > CMakeLists.txt:92 (find_package) > > > > -- Configuring incomplete, errors occurred! > > > > On Thursday, December 14, 2023 at 4:10:41 PM UTC-5 Alexis wrote: > >> Hi, >> >> It seems that in the environment in which you are trying to build >> ledger has Python version 3.9 installed (maybe a venv?), but >> the Boost library (version 1.71) provides bindings for Python 3.8. >> >> Did you run `./acprep dependencies`? >> What Linux distro and version are you on? >> Are you running a venv (or something similar)? >> >> >> Cheers >> Alexis >> > -- --- You received this message because you are subscribed to the Google Groups "Ledger" group. To unsubscribe from this group and stop receiving emails from it, send an email to ledger-cli+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ledger-cli/e8707d17-93bc-4311-a620-70f4a3d8a4e1n%40googlegroups.com.
Re: building python package
I've done this: $ conda create -n ldg-build python=3.8 boost py-boost zlib $ ./acprep dependencies ... 0 upgraded, 0 newly installed, 0 to remove and 132 not upgraded. $ cmake -Bbuild -S. -DUSE_PYTHON:BOOL=ON^C -- Found Python: /home/sergiu/miniconda3/envs/invest_01/bin/python3.9 (found version "3.9.16") found components: Interpreter -- Found Python: /home/sergiu/miniconda3/envs/invest_01/bin/python3.9 (found version "3.9.16") found components: Interpreter Development CMake Error at /usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake:117 (find_package): Found package configuration file: /usr/lib/x86_64-linux-gnu/cmake/boost_python-1.71.0/boost_python-config.cmake but it set boost_python_FOUND to FALSE so package "boost_python" is considered to be NOT FOUND. Reason given by package: No suitable build variant has been found. The following variants have been tried and rejected: * libboost_python38.so.1.71.0 (3.8, Boost_PYTHON_VERSION=3.9) * libboost_python38.a (3.8, Boost_PYTHON_VERSION=3.9) Call Stack (most recent call first): /usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake:182 (boost_find_component) /usr/share/cmake-3.16/Modules/FindBoost.cmake:443 (find_package) CMakeLists.txt:92 (find_package) -- Configuring incomplete, errors occurred! On Thursday, December 14, 2023 at 4:10:41 PM UTC-5 Alexis wrote: > Hi, > > It seems that in the environment in which you are trying to build > ledger has Python version 3.9 installed (maybe a venv?), but > the Boost library (version 1.71) provides bindings for Python 3.8. > > Did you run `./acprep dependencies`? > What Linux distro and version are you on? > Are you running a venv (or something similar)? > > > Cheers > Alexis > -- --- You received this message because you are subscribed to the Google Groups "Ledger" group. To unsubscribe from this group and stop receiving emails from it, send an email to ledger-cli+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ledger-cli/1ecbad87-6060-4622-8577-eb0ecd08d9a6n%40googlegroups.com.
Re: building python package
Hi, It seems that in the environment in which you are trying to build ledger has Python version 3.9 installed (maybe a venv?), but the Boost library (version 1.71) provides bindings for Python 3.8. Did you run `./acprep dependencies`? What Linux distro and version are you on? Are you running a venv (or something similar)? Cheers Alexis -- --- You received this message because you are subscribed to the Google Groups "Ledger" group. To unsubscribe from this group and stop receiving emails from it, send an email to ledger-cli+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ledger-cli/lzm2nxteujoscxigxmeg2jquvknmm6zobmvinrzzv6b4aukeev%404wblc5iwi25r.
Re: building python package
anyone? really need to get this working. thanks. On Wednesday, October 25, 2023 at 9:35:52 PM UTC-4 lipp f wrote: > Wondering if I can get a bit of help. TIA. > > This is what I've done > > - download and unpack the release > - in the release folder, run > $ ./acprep update --prefix=/usr/local -- -DUSE_PYTHON=ON > > and this is what I'm getting: > > /home//sc_invest/ledger-3.2.1/./acprep:195: DeprecationWarning: > inspect.getargspec() is deprecated since Python 3.0, use > inspect.signature() or inspect.getfullargspec() > argspec = inspect.getargspec(self.main) > acprep: INFO: Invoking primary phase: update > acprep: INFO: Executing phase: update > acprep: INFO: Executing phase: pull > acprep: INFO: Executing phase: make > acprep: INFO: Executing phase: config > acprep: INFO: Executing phase: configure > acprep: INFO: System type is => b'Linux' > acprep: INFO: Setting up build flavor => debug > CMake Warning: > No source or binary directory provided. Both will be assumed to be the > same as the current working directory, but note that this warning will > become a fatal error in future CMake releases. > > > -- Found Python: /home//miniconda3/envs/invest_01/bin/python3.9 > (found version "3.9.16") found components: Interpreter > -- Found Python: /home//miniconda3/envs/invest_01/bin/python3.9 > (found version "3.9.16") found components: Interpreter Development > CMake Error at > /usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake:117 > (find_package): > Found package configuration file: > > > /usr/lib/x86_64-linux-gnu/cmake/boost_python-1.71.0/boost_python-config.cmake > > but it set boost_python_FOUND to FALSE so package "boost_python" is > considered to be NOT FOUND. Reason given by package: > > No suitable build variant has been found. > > The following variants have been tried and rejected: > > * libboost_python38.so.1.71.0 (3.8, Boost_PYTHON_VERSION=3.9) > > * libboost_python38.a (3.8, Boost_PYTHON_VERSION=3.9) > > Call Stack (most recent call first): > /usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake:182 > (boost_find_component) > /usr/share/cmake-3.16/Modules/FindBoost.cmake:443 (find_package) > CMakeLists.txt:82 (find_package) > > > -- Configuring incomplete, errors occurred! > See also "/home//sc_invest/ledger-3.2.1/CMakeFiles/CMakeOutput.log". > acprep: ERROR: Execution failed: cmake -DCMAKE_INSTALL_PREFIX=/usr/local > -DBUILD_DEBUG=1 -DUSE_PYTHON=ON > -- --- You received this message because you are subscribed to the Google Groups "Ledger" group. To unsubscribe from this group and stop receiving emails from it, send an email to ledger-cli+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ledger-cli/ec530e8a-01a9-4642-b48a-51960f463a44n%40googlegroups.com.
Capital gain records
I'm importing all transactions from my broker. They are buy / sell securities. Is there a easy way to create the capital gain records? -- --- You received this message because you are subscribed to the Google Groups "Ledger" group. To unsubscribe from this group and stop receiving emails from it, send an email to ledger-cli+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ledger-cli/3c2c1b2d-e88b-490c-a9d9-8b8c31e272ban%40googlegroups.com.