Here is a lesson worth repeating: The holy grail cannot return a single number, or more accurately, a 0-rank tensor. It has to be at least a vector, or rank-one tensor. Markets are level efficient, but not momentum efficient, and probably on up to higher derivatives. Also, the idea of homotopy from topology, a continuous deformation of one thing into another is worth noting when designing trading strategies. No discontinuities along the way — no ripping, no jumping suddenly from one thing to another. Ideally anyway.
Yeeeeeeeeeeeeeeehaaaaaaaaaa! I didn't get an error Not sure if it compiled though since I have no idea what the "bin" version of this stuff is. That "Use Quartus Prime Standard Edition for non A10 devices" is suspicious. C:\Users\Administrator\Documents\Visual Studio 2015\Projects\OpenCL\Altera\exm_opencl_hello_world_x64_windows_16.0\hello_world>aoc device\hello_world.cl -o bin\hello_world.aocx --board c5soc aoc: Use Quartus Prime Standard Edition for non A10 devices. Current Quartus Version is: Quartus Prime Shell Version 16.0.0 Build 211 04/27/2016 SJ Pro Edition Copyright (C) 1991-2016 Altera Corporation. All rights reserved. C:\Users\Administrator\Documents\Visual Studio 2015\Projects\OpenCL\Altera\exm_opencl_hello_world_x64_windows_16.0\hello_world>
BTW, it looks like even if you install the lite version of Altera, you have to install [either] the Pro or Standard version, otherwise things don't work. it doens't appear you have to license them though - they just have to be installed and an Environment variable aimed at it. Thank God they are like $3000 each. This seems horrible to me and I don't know why they do this. Each one of these environment is almost 30GB big each! Why the duplication?
Oh shit, now I get it: "*The Quartus Prime software Pro edition version 16.0 supports the following device families: Arria 10." "The Quartus Prime software Standard edition version 16.0 supports the following device families: Arria II, Arria 10, Arria V, Arria V GZ, Cyclone IV, Cyclone V, MAX II, MAX V, MAX 10 FPGA, Stratix IV, and Stratix V. Starting with version 16.0, Quartus II Subscription Edition is now Quartus Prime Standard Edition." Damn. I have to uninstall the Pro, download the Standard, reinstall it, then try again. These things are 25 GB big! It takes an hour to download and a good 45 minutes to install. Sigh. Back too the trenches.
Success. Was finally able to execute Code: aoc device\hello_world.cl -o bin\hello_world.aocx --board c5soc without any errors. Weird though, it launches MSVC and puts me at the source code to the .cl file. Since I have no idea what this thing is supposed to do, I don't know how far I actually am, but it feels like I am near the mountain peak. There are a big number of files in the bin directory with a timestamp near the compilation time so something happened.
I got an .aocx file. I think it is downhill from here. I am astonished. This module below took an hour to compile! Gulp. Granted, I am running this on a dual core i3 laptop, but seriously? I need an FPGA to compile an FPGA kernel! Code: // Copyright (C) 2013-2016 Altera Corporation, San Jose, California, USA. All rights reserved. // Permission is hereby granted, free of charge, to any person obtaining a copy of this // software and associated documentation files (the "Software"), to deal in the Software // without restriction, including without limitation the rights to use, copy, modify, merge, // publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to // whom the Software is furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all copies or // substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES // OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR // OTHER DEALINGS IN THE SOFTWARE. // // This agreement shall be governed in all respects by the laws of the State of California and // by the laws of the United States of America. // AOC kernel demonstrating device-side printf call __kernel void hello_world(int thread_id_from_which_to_print_message) { // Get index of the work item unsigned thread_id = get_global_id(0); if(thread_id == thread_id_from_which_to_print_message) { printf("Thread #%u: Hello from Altera's OpenCL Compiler!\n", thread_id); } }
BTW, the Xilinx answer to OpenCL is HLS which stands for High Level Synthesis. Here is a nice tutorial http://www.xilinx.com/support/docum...g871-vivado-high-level-synthesis-tutorial.pdf Very hard for me to tell at this point, but Xilinx seems to be friendlier to the low budget firm, but Altera tools seem to have more turnkey solution implemented on them. The downside is that Altera based products are astronomically expensive. I think Intel is trying to make this more mainstream. We'll see.
Imagine you had a map like the one below at every price "near" the current price at any given time t. This is called a phase portrait. This is the holy grail. There is a mathematically rigorous way to derive these portraits. Notice two blue lines. Trading on this path is trivial. Move away from it and it becomes non-linear. This looks an aweful lot like a mean reverting market and market is in "FV": It is important to note that phase portraits can be more varied shapes, such as Notice how heavily favored the lower left to upper right blue arrow this portrait is. This is definitely a momentum based market. There is one more concept that is well worth understanding, the saddle point of a phase portrait because they are unstable. For example, for the first graph above, the equilibrium solution (0,0) is called a saddle point and is unstable. It is the pencil standing on its sharp edge. So the easiest form of trading is also the one least likely to remain for any length of time into the future because it passes through the saddle point.