hosseinmoein / DataFrame

C++ DataFrame for statistical, Financial, and ML analysis -- in modern C++ using native types and contiguous memory storage
https://hosseinmoein.github.io/DataFrame/
BSD 3-Clause "New" or "Revised" License
2.46k stars 310 forks source link

Arm64 support? #182

Closed Sr-316 closed 2 years ago

Sr-316 commented 2 years ago

Does this library compile and run on macOS Monterey 12.5 ARM64 ??? I'm simply trying to run the examples using g++ (/usr/bin/g++) - std=c++20 and its saying it won't run on this architecture... I tried to download it and run it off of vcpkg, and tried building and installing from source and neither has worked... is there specific compile and/or linking flags to use? It's seeming like there's a lot of packages in c++ that don't run with the arm64/ aarch64 architecture... I just purchased this Mac and was excited to get programming on it after always thinking everything ran smoother on Mac's lol

Am I missing something here? (Please god tell me I am)

hosseinmoein commented 2 years ago

I also have a MacBook but with Intel chip. I have never worked with a Mac with arm chip. When you say it doesn't work what do you exactly mean? Does it compile? If not what compile errors do you get? If it compiles, what runtime errors do you get?

Sr-316 commented 2 years ago

sorry, ill re-run it again and post my errors.

hosseinmoein commented 2 years ago

Also try Conan https://conan.io/center/dataframe?os=Linux&tab=overview

Sr-316 commented 2 years ago

DataFrameError

Sr-316 commented 2 years ago

linker error obviously but.. I have the project cloned project directories include folder and added it all to CMakeLists.txt (will post a pic of that)

Sr-316 commented 2 years ago

sorry, adjusted my CMakeLists.txt, now. Screen Shot 2022-06-07 at 6 26 12 AM .

hosseinmoein commented 2 years ago

Two guess: DataFrame is almost a header-only library. But it is not, you have to first build the DataFrame library and then link with it. So my first guess is that you are not building the DataFrame library. My second guess is that you may have path problems in your linker. You should point the linker to the place where DataFrame library is with -L linker command line

Sr-316 commented 2 years ago

I gotcha.. I built the library with the build_all shell script and I see the 2 Linux libs (Linux.GCC64 and Linux.GCC64D) do I link to one of those? and the CMAKE command is target_link_libraries( [path/to/Liunux.GCC.file] ) ??

hosseinmoein commented 2 years ago

yes. The one with D is the debug version

Sr-316 commented 2 years ago

so this is my project layout. I have DataFrame in the project root directory, built project and included the header files (include directory) used find_package, and target_link_libraries, and it all compiles and CMAKE is happy, but then I get this linker error

is it because I copied the hello_world.cc to the main.cpp? Screen Shot 2022-06-07 at 6 50 51 AM

hosseinmoein commented 2 years ago

usually the linker options go like this

-L<full path to Linux.GCC64 directory>
-lDataFrame
Sr-316 commented 2 years ago

so if I just did it through the command line..

g++ -O0 -Wall -std=c++20 main.cpp -o main \ -L[full path to Linux.GCC64 directory] \ -lDataFrame

this should work ^^^ ?

hosseinmoein commented 2 years ago

it should

Sr-316 commented 2 years ago

beautiful! thank you sir.. it didn't work at first try on command line because I hadn't copied the data files to the root project dir then I went to the examples folder and jus tried it on the hello_world provided there and it didn't see the data files so I moved the data folder to the root directory and tried the "main" again and it worked.

Sr-316 commented 2 years ago

still unsure why cmake isn't working with it, but oh well. screw cmake and I guess.. screw Clion since it forces you to use cmake.. =/

anyways. thanks again. and ty for making the library. very much. do you know any other useful libraries for financial

hosseinmoein commented 2 years ago

shameless plug https://github.com/hosseinmoein/Matrix

Sr-316 commented 2 years ago

Hey, I'm working on a personal project, taking Interactive Brokers C++ TWS API and trying to recreate some projects I've made in Python, in C++ (and am aiming to utilize async functionality of C++) .

In Python, Dictionaries are perfect containers (storage objects) for financial purposes and work seamlessly with pandas DataFrames.. I was hoping to use the same concept with C++ and cpp DataFrames. Are MultiMaps easy to use with these DataFrames..

Do you have any messenger app (e.g. Telegram or What'sApp) that we could maybe chat on a bit?

I'm currently building automated Options trading strategies in C++ (sort of recreating them, from Python versions I have already coded up)..

My story is pretty crazy, I've taught myself programming in like 5 Dif languages and learned most assets/facets of the financial markets (as far as technical analysis trading) and mixing the 2.. in the past 2 years...... was homeless with my son about 5 years ago and forced to find a new line of work due to a 2nd spine surgery.. so.. here I am..

But yea... regardless... Thank you very much for your time.. for your rapid responses on earlier messages, and your time/work provided to the open source community.. soon as I get this work up and going I'll definitely be a sponsor..

hosseinmoein commented 2 years ago

DataFrame is kind of like a multimap with an analytical interface. You can use either/or DataFrame and/or multimap. But you should understand that neither of them is multithreaded safe. Read the multithreading section of DataFrame doc

Sr-316 commented 2 years ago

Yeah I understand them will keep threaded safe part which is why I was planning to utilize asynchronous C++ options..

I think I get what you mean by using either or..

I probably just need to read into it a bit more.. so much going on between learning and creating new api features for TWSapi for options trading and learning the dataframe and it’s complexity as well as trying to make it all asynchronous lol.

Ok. Ty again for your reply

Josh Shay (619)530-7172 Valley Center, CA On Jun 8, 2022, 11:51 AM -0700, Hossein Moein @.***>, wrote:

DataFrame is kind of like a multimap with an analytical interface. You can use either/or DataFrame and/or multimap. But you should understand that neither of them is multithreaded safe. Read the multithreading section of DataFrame doc — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you modified the open/close state.Message ID: @.***>

Sr-316 commented 2 years ago

DataFrame is kind of like a multimap with an analytical interface. You can use either/or DataFrame and/or multimap. But you should understand that neither of them is multithreaded safe. Read the multithreading section of DataFrame doc

Do you think I could possibly ask you some questions and maybe show you what I'm working on and what I got, to see what you think? Since I'm a self taught programmer and self taught trader (taught myself C++, python, sql, JS, solidity, vyper, EOSIO C++ web3, etc... and trading stocks, options, crypto, arbitrage across both types of exchanges as well as stocks... all in the past 2 years... right now I'm automating options trading in c++ using Interactive Brokers Trader Workstation API..

it doesn't provide data for expired options contracts but I've found a way to get algorithmically find options prices for past/expired stock options contracts...

but I don't truly know the value and level of my skills/knowledge/products since I literally know nobody in either the financial sector nor the programming field..

Sr-316 commented 2 years ago

Haha awesome. That’s funny I actually beat you to it.. I have that on my screen checking it as we speak. Ty .. true Programmer Patriot ;)

Josh Shay (619)530-7172 Valley Center, CA On Jun 7, 2022, 8:02 AM -0700, Hossein Moein @.***>, wrote:

shameless plug https://github.com/hosseinmoein/Matrix — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you modified the open/close state.Message ID: @.***>