Search results

  1. Calling C++ from VBA

    You can call exposed C/C++ DLL functions from VBA (but depending on your analytic interface, you may need a C wrapper). Alternatively you can do Excel/VBA -> managed C++ -> your analytic library (i.e. skip the C# layer). Either way, you only need at most one "intermediate" layer between...
  2. XLL in C#

    C++ based XLL is a DLL anyway, You can simply reference it in a C# project just as if it's a regular DLL. (However any Excel interfacing specific features will be irrelevant in such scenarios.)
  3. More on C# in Front Office

    I just published a new book, More on C# in Front Office. It's NOT a 2nd edition of my previous book. Instead it contains new topics and many additional information. All the contents are based on readers' feedback on my previous book. As usual, you can find more information and also some...
  4. How to create UDF in Excel using C# and Visual Studio 2008

    Tysken, if your locale is not English, and especially your Excel's language is different from your Windows, you need to be careful about all operations that require data type conversion either explicitly or implicitly. Try Andy's example to see whether it works. If not, try the following...
  5. How to create UDF in Excel using C# and Visual Studio 2008

    If you see #Value (instead of #N/A), it indicates an exception was thrown inside the code (instead of function not found). A recommended way to write UDF in C# is always do sth like the following: object MyFunction(parameter list) { try { // your real code } catch(Exception...
  6. Could I get to New York?

    To some extent, quant is simply a higher paid hand-dirty programmer. (Even some non-financial sector programmers may demand more math skills.) I am not entirely sure about your motivation. But if you think the perceived compensation may attract you, you can find a higher paid job with your...
  7. Import data to Access

    Oh? How comes it popped up in the first page? ;-) (I seldom read page that is not on the 1st page :->)
  8. Import data to Access

    if you manual procedure is more or less the same everyday, you should be able to similar that procedure (including removing header, de-merge cell, get external data, even Access database replication etc) using either VBA or C# etc.
  9. Fake citizenship ceremony

    The process to get a US GC is a good candidate for writing a time variant stochastic equation. lol ;-)
  10. Fake citizenship ceremony

    Read the original story on telegraph. It really makes a day for me. Indeed, a good candidate for a Hollywood movie!
  11. Hope for a future democratic China

    This is what I will guess too. It is also the case for highly educated Chinese.
  12. Hope for a future democratic China

    My prediction: there will be less and less highly educated Chinese immigrants who will settle down in US. One observation I shared with my friends is "even though there are many Mexicans in US, it is actually harder to find lots of highly educated Mexicans in Wall St firms and other Big...
  13. Hope for a future democratic China

    I meant "move back to China". Among others, the biggest hassle will be global tax and the need to maintain GC if you want. Personally I think it's often better to be a permanent resident and/or citizen of where you intend to live/retire. People tends to over-estimate the "insurance" value of...
  14. Hope for a future democratic China

    For old generations, the reality is it's difficult for them to move back because many of them don't have the locally relevant skills that matches the seniority they desire. If you believe people tend to do whatever they think is good for them, you should believe at least a portion of these...
  15. DJIA

    Is there any fundamental difference if you are allowed to trade any stock? (of course you will need more computation power in the later case :->)
  16. In Defense of 'Flash' Trading

    "Flash orders allow sophisticated high-frequency traders to gain access to trading information before it is sent out widely to other traders," Schumer said. "For a fee, the exchange will 'flash' information about buy and sell orders for just a few fractions of a second before the information is...
  17. Feedback on VBA Forms for Microsoft

    VBA is a good tool. Its ubiquitous adoption in many areas is a good evidence. One often-heard complaint against VBA is its support for code maintenance, i.e.. version control, which is a headache in a team development environment. There are also some minor technical issues. For example, after...
  18. C++ or C#, RTD or DDE, Xll or Dll?

    I haven't read that book personally (simply because I know C/C++ APIs and am able to write Excel Add-In using C/C++ as well). But table of contents looks good. Its coverage on this topic seems to be very complete and pretty detailed.
  19. C++ or C#, RTD or DDE, Xll or Dll?

    Which mail? the one concerning issues in a French/English hybrid environment? UDF, by definition, is designed to do some calculation and return some values. Therefore it cannot (or not supposed to) change workbook/sheet properties such as color. That said, it is possible to read such...
  20. C++ or C#, RTD or DDE, Xll or Dll?

    First, thanks for Andy's recommendation :-) Naos, The answer to your questions can be very long as it always "depends ...". So let me try some potentially over-simplified answers. 1. RTD v.s. DDE: I will prefer RTD, especially if you start from something "clean". Writing RTD using C# is...
  21. How to create UDF in Excel using C# and Visual Studio 2008

    Some more general notes on .NET application deployment. It is actually not so bad that many people fear. For a regular .NET application, the deployment is x-copy. Of course, you need to make sure the required version of .NET runtime and required dependent libraries exist. This is not anything...
  22. How to create UDF in Excel using C# and Visual Studio 2008

    If the "users" are your colleagues (i.e. you are working for the same company and thus have similar software installation), just try to copy the .dll to user's machine and ask them go to Tools -> AddIn -> Automation -> Browse. Alternatively, write a two line script, 1 is to copy the .DLL and...
  23. Using C# in Excel

    To evaluate whatever solution (xlw, ExcelDNA etc), the first question I will ask is whether it offers user new and useful functional features / convenience? If it does, my next question is what's the cost for these new features? Any comprise? Any cheaper alternative? .... So a short answer...
  24. Using C# in Excel

    Again it is your imagination. I wrote XLL myself. What I view as inferior is a solution that has thousands of lines without obvious functional benefits (and may even lose some free features). This applies to whatever technology. I said very clearly before that "it is a complete hack and I...
  25. Using C# in Excel

    I like your ideas. Some of these features (e.g. integrated editor/debugger etc) are great and very useful.
  26. Using C# in Excel

    I don't know where did you get the impression that I don't like XLL. Is this simply because I personally prefer the native ~10 lines of code over xlw? XLL != xlw. The reason why I am not that favor xlw is because the benefit of xlw/XLL over add-in does not justify the loss of many useful...
  27. Using C# in Excel

    Actually I am also interested to know what kind of "support" or user interface you plan to provide in ExcelDna for these techniques? I know these are very useful in some cases and in fact I am using some of these features in the native add-in approach. So i am very interested in what additional...
  28. Using C# in Excel

    Govert, Good to hear your thoughts. I think in general .NET is the direction for providing value-added features to Excel (and other MS product). And I also agree with you that it is not crystal clear about MS' long-term strategy. I guess Excel Service fits its grand view of SOA and Web...
  29. Using C# in Excel

    AlexesDad - I guess you are using the built-in super restrictive guest account on your home PC? Try it on a typical PC in your working environment. To be very frank, I am really tired of sticking on this point endlessly. Firstly, this will be an issue only if it cause practical problem (e.g...
  30. Using C# in Excel

    Actually I don't know whether installing an application on Windows is necessarily more difficult than on Unix. e.g. installing application such as Oracle etc. Even for some small applications, e.g. printer, flash players etc, I always find more issues when installing them (mainly drivers) on...
  31. Using C# in Excel

    First, regasm does not require admin right in a typical setup. If you still don't believe it, as I have suggested many times to you, try to compile a COM yourself (or take example from here), go to a computer which you don't have admin right and have a try yourself. It just take minutes to test...
  32. Using C# in Excel

    I usually write a very simple script (.bat?) for deployment which basically copies the DLL to a local directory and run regasm if this is not the first time deployment. Please note that as long as the DLL is registered once, you don't need to re-register even if there are massive change within...
  33. Interesting observation about Price and Volume

    It is not that unusual. It is a bear market, so the overall trend is downward. As such 1] If the sell volume increases, it will accelerate downward pressure 2] If the prices go up (i.e. upward adjustment within a bigger downward trend), people became cautious, thus results in decreased volume...
  34. Using C# in Excel

    Assuming it is an automation add-in, do one of the following: 1] in Excel, Tools -> Add-Ins -> Automation -> Browser and pick up your DLL 2] run regasm on your new machine
  35. Will "Thinking in C++ Vol 1+ Vol 2" help me create a good base ?

    try this site. There is a link "download source code". Good luck.
  36. Will "Thinking in C++ Vol 1+ Vol 2" help me create a good base ?

    agree with alain, "Thinking in C++" is a good resource for people to learn C++. I remember there is a free html version somewhere on the internet where you can also download the sample code.
  37. The Bailout Plan

    If the country is in trouble, I don't mind coming for rescue. The problem I have in US' bailout program is those responsible are not get punished and, arguably, still be able to continue making killer profits. If we compare British banks and American banks who were bailed out at the cost of...
  38. More On C# in Front Office - feedbacks

    Thanks for keep update. I don't like many brick type of books that contain full of information that can be easily found online (e.g. syntax etc) ... it is always easy to google the internet than to search in a book (even assume you can carry those books wherever you go). I like those books...
  39. multi-threaded semaphore C++

    It also depends on what's interviewer's expectation about your real/practical experience. I agree that multi-threading concepts are not difficult to understand (may things are simply common sense), but it is not hard to spot whether the knowledge is gained from books or practice. As an...
  40. multi-threaded semaphore C++

    Agree with DominiConnor and Alain. Your resume need to interest your potential employer enough but at the same time manage the interviewers' expectation (i.e protect yourself). It is not easier than learning multi-threading ;)
  41. future of algorithmic trading

    True, it is not easy for competitors to know exactly what you are doing (especially given you may continuously polish your ideas). But competitors in the same category may know roughly what you do. And, interestingly, I think many people in the same field may even independently come up with...
  42. multi-threaded semaphore C++

    Simple (and boring) answer - depends on which house do you go. But in my view, it is always a good idea at least to have some knowledge.
  43. More On C# in Front Office - feedbacks

    Thanks for your compliments :-). And I am looking forward to hearing from you further.
  44. future of algorithmic trading

    In terms of electronic/algo trading, I believe that one can get sustainable advantage if he can simply execute trades faster than his competitors. But I kind of suspect one can get sustainable advantage simply by "smarter" algorithm ... especially given many participants know roughly what the...
  45. More On C# in Front Office - feedbacks

    The following is an email I sent out earlier today to the list of people who have contacted me about the book. As I am also very much interested in hearing from people on this forum, I decide to post it here too. (BTW, You are welcome to email me privately if you prefer.) Thanks...
  46. TARP repayment and H1 restrictions

    There are simply too many talents coming and working in the States in the past. So Americans do not care. Now more and more talented foreigners choose to not to come / return. Many of them get much higher social status and even make more $$$ in their home countries. So this issue will be less...
  47. Reports in C++

    Well, actually I have been using C++ for much longer than C#. I love C++ (also Java). If asked to write a core analytic library, I will go for C++ in most cases. But if asked to write a front end, reporting, GUI, Excel ...., I will prefer C#. Taking reporting as an example, if it is intended...
  48. How to combine C++ and C# in Visual Studio?

    BTW, combining C# and C++ is actually quite useful and very relevant in front office, both in Excel integration and beyond. Many analytic libraries are written in C++. With a C# wrapper, you can no only expose the logic to a nice front end (Excel, WinForm alike), but also instantly add more...
  49. How to combine C++ and C# in Visual Studio?

    There are multiple ways to combine C# and C++. 1] Compile C++ code into DLL. Then you invoke C++ code from C# in the same way as invoke DLL function in VB/VBA (check out the import attribute in C#) 2] Compile C++ code into a COM. Then you can use this component as if it is written...
  50. Random numbers in Monte Carlo simulation

    What we want (in MC) is to sample the whole outcome space and avoid bias towards certain results. "equally" actually cannot be easily defined, but may be easy to imagine. The key point is in MC, we don't really need randomness. For example, consider the following two sequence of 8 "seeds" 0...
  51. Most frequently used boost libraries?

    I think smart pointers may be the widest used. Others like triplet, regexp, Spirit etc are also quite often seen.
  52. How to create UDF in Excel using C# and Visual Studio 2008

    Common seen reasons: 1] If you are using VS2005 for Excel 2002, you will need an excel.exe.config (can be download here 2] It is a good practice to explicitly specify ComVisible attribute at both assembly and class levels. (because VS2005 and VS2008 have different default settings for...
  53. Using C# in Excel

    You can only reference a library, not an .exe. Maybe this restriction is a bit strange, but unfortunately it is there until MS removes it. On a positive side, this may somewhat enforce good architecture design. i.e. separating business logic from presentation. Business logic code should be in...
  54. Using C# in Excel

    Of course, you almost for sure will have >25 threads. The point is whether all these threads are CPU heavy.
  55. Using C# in Excel

    25 concurrent threads is the default, though you can adjust by changing the machine.config. Actually it comes back to a more basic question. Is it really a good strategy to run 25 CPU intensive threads SIMULTANEOUSLY per CPU/core? Probably not. Running 1 or 2 CPU intensive thread with bunch...
  56. Random numbers in Monte Carlo simulation

    To some extents, in MC, we need "equally" distributed according to a distribution, not really random. This is why LDN is good candidate.
  57. Using C# in Excel

    I haven't seen threading pool issues in the past (of course, you need to create your own thread, not use the default worker thread). But I do encounter problems in its garbage collection for large scaled messaging system (e.g. the one in London Stock Exchange). We actually got a Microsoft senior...
  58. Using C# in Excel

    An engine controller typically controls 30+ "slave" machines, each of which run3 4 pricing engines (a 4-core machine). We have multiple farms for different teams. One nice thing is that it serves both Windows clients and Unix clients :-) Also, London Stock Exchange has a messaging based...
  59. Using C# in Excel

    Certainly. Excel IS a front end. By putting the logic inside an assembly (instead of VBA), it is now possible to make multiple facades for your core logic library. In addition to Excel, it can also be shared by a regular C# application on either a local or a remote machine, C++ application and...
  60. C# in Front Office book

    This book now is available in Wilmott Bookshop.
  61. Using C# in Excel

    True and not true. Using C# class from VBA is in fact straight-forward. Almost all C# classes can be registered as COM easily (meaning you don't need to worry about the details). There is an example in my book. As a matter of fact, we use VBA/Excel as front end to send jobs to a C# based...
  62. Reports in C++

    Old styled text based line-by-line report using C++ may be OK, not fancy user friendly report. I found many people tended to think C++ and Java/C# are similar. But in fact, they are not. C++ is a powerful but primitive programming language, Java/C# is a programming language + architecture...
  63. C# in Front Office book

    Well, VSTO is not a plague for sure. Actually in the section 7.9, I was planning to give examples of customizing Outlook and Visual Studio itself using VSTO. It's a close decision to leave details out. Will definitely consider including VSTO in the 2nd edition, if there is one :-)
  64. C# in Front Office book

    I do use VSTO, but decided to leave it out in this book (but may include in the 2nd edition, if there will be one :->) The main reason to leave VSTO out is for practical consideration. On the trading floor, it's better to avoid frequently installing applications that will need to force user...
  65. Using C# in Excel

    Some sample code Some examples of C# code http://book.greenwich2greenwich.com/Examples/ and relevant book http://book.greenwich2greenwich.com/CsInFrontOffice/
  66. C# in Front Office book

    Just published http://book.greenwich2greenwich.com/CsInFrontOffice/ So far, I have got very encouraging feedback. And it seems to be relevant to some previous posts in this forum. <iframe...
Back
Top