program c++,Python

Java Python A. Ox program (for technical analysis and VaRcomputation in Assignment 1 and 2)
1. Ox download: 
- Go to www.doornik.com/download.html
- Click on “Click here to download Ox Console” and choose the Ox program compatible with your computer, e.g. the link “download” under “Ox Console 8.0 for Windowes 10.8,7 (.exe) for Windows and under “Ox Console 8.0 for macOS (.pkg.zip)” for Mac.
- Install it.
For Mac users, if the program can’t be opened by the problem of “unidentified developers”, go to System Preferences, choose the icon “Security & Privacy” and look at the options under “Allow apps downloaded from”:
- If there is an option “anywhere”, click on the “lock”icon to tick that option, so you can install Ox now. After the installation, you may untick “Allow apps downloaded from” and re-tick “Mac App Store and identified developers”.
- If there is no option “anywhere”, you would see the lines that ask for the permission to install Ox. Allow it.
2. You should check if you can save the ox file “sample2_ox.ox” under
Window: C:\Program Files(x86)\OxMetrics8\ox\bin
Mac: /Applications/OxMetrics8/Ox/bin/
If you don’t have the permission to save the file in this folder, do the following:
Window:
- Right click on the folder OxMetrics8, choose “Properties”, choose tab “Security”. 
- Click on “Edit”, choose the line “Users…” under “Administrators…” AND ALSO “Users…”. 
- Tick “Write” under column “Allow” in the small window “Permission for Users” for each of “Administrators…” and “Users…” above.
- Click ok.  
Mac: 
- Right click on the folder OxMetrics8, choose “Get Info”, scroll down the “Get Info” window to seesection “Sharing & Permission”. 
- Choose “Read & Write” under column “Privilege” for “admin and everyone” under column “Name”.
- Click on the “lock” icon, enable it, and click on the Wheel icon to the left of the “lock icon”, choose “Apply to enclosed items”.
  3. To run an Ox program, e.g. “sample2_ox.ox”, click on the first “Play” button on the top right of the software OxEdit.
- You should see two matrices in the “Ox Output” window: 
      ​​and​​
 
 
B. Open the Ox output file “.out” (for Assignment 1 and 2)
- In the technical analysis and VaR analysis, we have the output with extension “.out” generated by Ox, e.g. “mv5ave.out” that calculates the 5-day moving average fo program、 c++,Python r every stock in the data sample.
- This output file is saved in the folder where you save all the files and codes, e.g.
Window: C:\Program Files(x86)\OxMetrics8\ox\bin
Mac: /Applications/OxMetrics8/Ox/bin/
- This is because the code and data are saved in the folder above, so Ox will generate any output in the same folder. To open “mv5ave.out”:
Window: 
- Open Excel. Click “File/Open/Browse” and go to C:\Program Files(x86)\OxMetrics8\ox\bin
- Choose “All Files” in the small window on the right hand side of “File name:” to see all files in that folder.
- You can now see “mv5ave.out” in the Browse window. Double click on it.
Mac:
- Go to /Applications/OxMetrics7/Ox/bin/ and right click on “mv5ave.out”.
- Choose “Get Info”, look at “Name & Extension:” and change the filename to txt format, i.e. “mv5ave.out” is changed to “mv5ave.txt”.
- A window pops up, and choose “Use .txt”.
- Open Excel. Click “File/Open/Browse” and go to /Applications/OxMetrics8/Ox/bin/.
- Open “mv5ave.txt” shown in the Browse Window.
For both Window and Mac, when you open “mv5ave.txt”, a window “Text Import Wizard” shows up. Follow the steps below:
- Step 1 of 3: choose “Delimited”. Click Next.
- Step 2 of 3: for “Delimiters”, tick “Space” and untick “Tab”. Click Finish.
- You should now see a table with 2275 rows and 19 columns that represents 5-day moving average of all 19 stocks.
C. Stata access (for regression analysis and Assignment 3)
- go to https://aaa-access.unsw.edu.au/vpn/index.htmland log in with you student zID. Follow the steps to install Citrix Receiver.
- You don’t need to open Citrix Receiver once it is installed. Just leave it there in your computer and go back to your web browser.
- On the window of web browser, you should see the panel “Welcome to myAccess” if successfully installing Citrix Receiver. Click ok.
- Scroll down the web browser until you see the icon “STATA-SE 14” and click on it. Then click Open. A window will pop up. 
- Tick on “Remember my choice for receiver links” and click “Open Link”.
- Wait a few minutes to have Stata in your computer. Note that you have remote access to Stata in a virtual machine, i.e. Stata not installed to your computer. Be sure that you have internet and follow the above steps if you want to use Stata again         

### 配置 Visual Studio Code 进行 C++ 和 Python 的跨语言调试 #### 使用多语言调试功能 为了实现 C++ 和 Python 之间的跨语言调试,在 Visual Studio Code 中可以利用其强大的扩展生态系统来设置一个多语言调试环境。对于每种语言,都需要安装相应的调试器并配置 `launch.json` 文件。 #### 安装必要的扩展 确保已安装适用于 C++ 和 Python 的官方扩展: - 对于 **C++** ,应安装 Microsoft 提供的 “C/C++” 扩展[^1]。 - 对于 **Python** ,则需安装由 Microsoft 开发和支持的 “Python” 扩展。 这些扩展不仅提供语法高亮显示、智能感知等功能,还集成了各自的语言服务器协议(LSP),从而使得集成开发体验更加流畅。 #### 创建 launch.json 配置文件 在项目根目录下创建 `.vscode/launch.json` 文件,定义多个调试配置项以便能够分别启动不同语言的应用程序或在同一会话中同时执行两者。下面是一个简单的例子展示如何为上述两种语言设定基本的调试选项: ```json { "version": "0.2.0", "configurations": [ { "name": "(gdb) Launch C++ Program", "type": "cppdbg", "request": "launch", "program": "${workspaceFolder}/build/main.exe", // 编译后的可执行文件路径 "args": [], "stopAtEntry": false, "cwd": "${fileDirname}", "environment": [], "externalConsole": true, "MIMode": "gdb", "miDebuggerPath": "/usr/bin/gdb", // GDB 路径 "setupCommands": [ { "description": "Enable pretty-printing for gdb", "text": "-enable-pretty-printing", "ignoreFailures": true } ], "preLaunchTask": "Build C++ Project" }, { "name": "Python: Current File (Integrated Terminal)", "type": "python", "request": "launch", "program": "${file}", // 当前打开的 .py 文件 "console": "integratedTerminal" }, { "name": "Combined Debugging Session", "type": "compound", "configurations": ["(gdb) Launch C++ Program", "Python: Current File (Integrated Terminal)"] } ] } ``` 此 JSON 片段展示了三种不同的调试模式:单独运行 C++ 或者 Python 应用以及组合起来一起使用的复合会话。“Combined Debugging Session”的存在允许开发者在一个窗口内监控两个进程的状态变化情况。 #### 实现跨语言交互逻辑 当涉及到实际业务场景中的数据交换时,则可能需要用到 IPC(Inter-process Communication),即进程间通信机制。这可以通过多种方式达成,比如通过命令行参数传递消息给子进程;或者更复杂的方式如共享内存区、套接字连接等。具体采用哪种方案取决于应用程序的需求和技术栈的选择。
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值