Jump to content

ValeryVal

Active Members
  • Posts

    458
  • Joined

  • Last visited

About ValeryVal

  • Birthday 05/10/1970

Profile Information

  • Member Title
    Dig the way
  • Location
    Russia

Recent Profile Visitors

783 profile views

ValeryVal's Achievements

Universalist

Universalist (7/7)

8

Reputation

  1. >a typewritten paper from 1972...this financial stuff works out for you Hmm. Long John Silver from Treasure Island are using old and smoky map of island >I'm really good at keeping secrets too This secret is simple. Long John Silver tell about how he keeps his wealth, “I puts it all away, some here, some there, and none too much anywheres…” BTW Have you read a story of previous Silver's life Flint and Silver: A Prequel to Treasure Island http://www.amazon.com/Flint-Silver-Prequel-Treasure-Island/dp/B004JZWOPG John Silver had never killed a man. Until now, his charisma, sheer size and, when all else failed, powerful fists had been enough to dispatch his enemies. But on a smoldering deck off the coast of Madagascar, his shipmates dead or dying all around him, his cutlass has just claimed the lives of six pirates. Surrounded by their revenge-thirsty crewmates, Silver fears for his life, but then the pirate captain makes him an offer he can’t refuse. On the other side of the world, Joseph Flint, a naval officer wronged by his superiors, plots a bloody mutiny. Strikingly handsome, brilliant but prey to sadistic tendencies, Flint is regarded as the most dangerous bandit on the high seas and fate would have it that his course intersects with Silver’s. Together these gentlemen of fortune forge a deadly and unstoppable partnership, steering a course through treachery and betrayal while amassing vast treasure.
  2. Yes! I'm ready to foil any onrush to 2.3. I guess you were near the entrance to Shambhala from that trans-Himalayan cave. Meantime I've found the Efficient Portfolio Frontier by means E4A and Robert C. Merton article http://www.people.hbs.edu/rmerton/analytical%20derivation.72.pdf Thank you. Happy New Year
  3. ValeryVal: Everyone has own unique tacit knowledge. However, not everyone has ability to tell about it.
  4. BTW. This known "bug" is from time of Fortran (pass-by-reference language). Example: http://stackoverflow.com/questions/7994360/passing-arguments-by-pass-by-reference-to-a-swap-function So according to assertion that "we can know more than we can tell" (See http://en.wikipedia.org/wiki/Tacit_knowledge) my script induces me to remember about one real girl making that tacit returns by ref from many nested procedures (fifth or more levels). It was very severe work to fish out her hand coding. In any case I've written valid script to solve my tasks under Eigen4AutoIt v.2.2 Thank you. ;-)
  5. Example shows this tacit return by ref. Let us have two expression: A = xC - yD B = yC - xD There are two version by E4A: ; long version I ; It returns valid result ;Matrix A $matT = _Eigen_CloneMatrix ($matC) _Eigen_CwiseScalarOp($matT,"*", $x) $matT1 = _Eigen_CloneMatrix ($matD) _Eigen_CwiseScalarOp($matT1,"*", $y) $matA = _Eigen_CwiseBinaryOp($matT,"-",$matT1) _MatrixDisplay ( $matA, "$matA" ) ;Matrix B $matT = _Eigen_CloneMatrix ($matC) _Eigen_CwiseScalarOp($matT,"*", $y) $matT1 = _Eigen_CloneMatrix ($matD) _Eigen_CwiseScalarOp($matT1,"*", $x) $matB = _Eigen_CwiseBinaryOp($matT,"-",$matT1) _MatrixDisplay ( $matB, "$matB" ) ; short version II ; Now it returns invalid result! $matA = _Eigen_CwiseBinaryOp(_Eigen_CwiseScalarOp($matC,"*", $x),"-",_Eigen_CwiseScalarOp($matD,"*", $y)) $matB = _Eigen_CwiseBinaryOp(_Eigen_CwiseScalarOp($matC,"*", $y),"-",_Eigen_CwiseScalarOp($matD,"*", $x))
  6. @RTFC: Would you like to update unexpected behavior functions - _CwiseScalarOp... and _CwiseUnaryOp? From Help: Apply [operator, scalar] to each cell of matrix A, storing the result in-place Maybe it would be better to have two variant: - to store in-place and not (default) These functions have tacit return by ref for passed matrix.
  7. No. My multivariant pdf modelling (by means decomposition of covariance matrix) promises me the way to survive during the 'crude oil price breakdown'.period according to Multivariate Survival Models http://data.princeton.edu/pop509/MultivariateSurvival.pdf
  8. The Russian Eigen4AutoIt Help v.2.2 has been completed. Eigen4AutoIt_2.2_ru.zip
  9. MetaQuotes Language 5 (MQL5) is the built-in programming language for automated trading strategies development. It allows creating Expert Advisors (trading robots), Custom Indicators, Scripts and Libraries. All these instruments significantly enhance traders' ability to trade on financial markets (Forex, Stock, Futures & CFD). MetaQuotes Language 5 is based on the concepts of the well known and popular С++ programming language. MQL5 is also a high-level object oriented programming language. However, due to its narrow specialization, MQL5 thrives in financial markets challenges. MQL5 includes numerous functions for forex and stock quotes analysis. Also there are built-in main technical indicators and functions, which control trading positions. Thanks to these possibilities of the programming language, all analytics and trade operations can be made entirely by such MQL5 programs. About MQL5 see in http://www.metatrader5.com/en/automated-trading/mql5 AutoIt3 has AutoItX control, DLL library, and header file AutoItX3_DLL.h. This message shows some test MQL5 script based on attached AutoItX3_DLL.mqh (header file for import AutoItX3.dll by MQL5). Test of usage AutoItX from MQL5: #include "AutoItX3_DLL.mqh" #import "user32.dll" int MessageBoxW(uint hWnd, string szText, string szCaption, int nType); int SendMessageW(uint hWnd, int Msg, int wParam, int lParam); #import //=========================== void OnStart(void) { //--- call init function int res; uint hWnd; string szTitle; int len = 100; //Get hWnd of terminal GUI hWnd = AU3_WinGetHandle("MetaTrader-Admiral Markets",""); res = MessageBoxW(0,hWnd,"hWnd of Terminal Gui",0); //Init string for Title text StringInit(szTitle,len,0); //Get Title of terminal GUI AU3_WinGetTitleByHandle(hWnd, szTitle, len); res = MessageBoxW(0,szTitle,"Title of Terminal Gui",0); //Set Title of terminal GUI AU3_WinSetTitleByHandle(hWnd, "My Terminal"); res = MessageBoxW(0,"Title was changed!","Title of Terminal Gui",0); } AutoItX3_DLL_mqh.zip
  10. This example is working for me. Matter in SciTE. Try script outside it. #include "TLBAutoEnum.au3" _AutoItObject_Startup() Dim $objFSO = ObjCreate("Scripting.FileSystemObject") ; here constants are imported and declared _TLBAutoEnum_ImportRelated($objFSO) ; here we use them just like native Dim $objFile = $objFSO.OpenTextFile(@ScriptFullPath, $IOMode.ForReading, False, $Tristate.TristateUseDefault) If IsObj($objFile) then MsgBox(0,"","$objFile is Ok!") endif $objFile.Close()
  11. Your Eigen4AutoIt allows us to solve very sophisticated problem such as this (See Appendix A.): http://micro.stanford.edu/~caiwei/papers/Yin_Barnett_Cai_MSMSE_preprint.pdf Thank you.
  12. BTW Would you like to know about this paper? Fast Computation of Moore-Penrose Inverse Matrices http://arxiv.org/ftp/arxiv/papers/0804/0804.4809.pdf He gives Matlab code of his "geninv" function
  13. Your code is amazingly like my one. Though your new version (2.1) shows true solution instead of zero-matrix $matI obtained from version 2.0. Cheers
  14. Nevertheless the example of Factorial for Long number exists: For $i = 40 To 50 $vInt = String($i) MsgBox(0,"", $vInt & "! = " & _LongFactorial($i)) Next ;=========================== func _LongFactorial ($vInt) If $vInt == "0" then Return "1" else Return _LongProduct($vInt,_LongFactorial ( String (Number($vInt)-1) )) endif endfunc ; #FUNCTION# ============================== ;From http://www.autoitscript.com/forum/topic/157301-longproduct/?hl=%2Bbignum#entry1139178 ; Name...........: _LongProduct ; Description ...: Multiplies two large positive integers together using old school long multiplication method ; Syntax.........: _LongProduct($vInt1, $vInt2) ; Parameters ....: $vInt1 - First integer - can be a number or a string of digits ; $vInt2 - Second integer - as above ; Return values .: Success - Returns the product of the two numbers ; Failure - Sets @error to 1 if either parameter contains non digit characters ; Author ........: czardas ; Comments ......; A separate function must be created if you want to preprocess floating point numbers ; ========================================= Func _LongProduct($vInt1, $vInt2) If Not (StringIsDigit($vInt1) And StringIsDigit($vInt2)) Then Return SetError(1) Local $vTemp ; Reuseable placeholder If StringLen($vInt2) > StringLen($vInt1) Then ; Set $vInt2 to be the shortest numeric string to reduce array size later $vTemp = $vInt1 $vInt1 = $vInt2 $vInt2 = $vTemp EndIf Local $iBound = StringLen($vInt2), $sZeros = "0" ; Zero padding for the method of long multiplication While StringLen($sZeros) < $iBound $sZeros &= $sZeros ; Tens, hundreds, thousands etc... WEnd $sZeros = StringRight($sZeros, $iBound -1) ; Highest order of magnitude needed Local $aPartProduct[$iBound], $iCarryForward ; Placeholder for tens of units, hundreds, thousands etc... For $i = 1 To $iBound ; Starting with the most significant digit in $vInt2 $aPartProduct[$i -1] = "" $iCarryForward = 0 ; Maximum possible value in this code section is 8 ==> 89 = 9*9+8 For $j = StringLen($vInt1) To 1 Step -1 ; Multiply every digit in $vInt2 by every digit in $vInt1 $vTemp = StringMid($vInt2, $i, 1) * StringMid($vInt1, $j, 1) ; Add the tens of units left over from the previous calculation $vTemp += $iCarryForward $iCarryForward = Number(StringTrimRight($vTemp, 1)) ; This will be added on the next run ; Append the units $aPartProduct[$i -1] &= StringRight($vTemp, 1) ; Digits appear in reverse sequence Next $aPartProduct[$i -1] &= $iCarryForward ; Pad with the correct number of zeros $aPartProduct[$i -1] = StringRight($sZeros, $iBound - $i) & $aPartProduct[$i -1] & StringTrimRight($sZeros, $iBound - $i) Next $iCarryForward = 0 ; Reset this variable for the following process ; Take the sum of all the part products in the array Local $sProduct = "" For $i = 1 To StringLen($aPartProduct[0]) ; Starting with the least significant digit $vTemp = 0 ; Sum value For $j = 0 To UBound($aPartProduct) -1 ; Add the digits from the units, tens of units, hundreds, thousands etc... $vTemp += StringMid($aPartProduct[$j], $i, 1) Next ; Add the value left over from the previous calculation $vTemp += $iCarryForward $iCarryForward = Number(StringTrimRight($vTemp, 1)) ; This will be added on the next run $sProduct = StringRight($vTemp, 1) & $sProduct ; Returns the digits in the correct order Next If $iCarryForward Then $sProduct = $iCarryForward & $sProduct If StringLeft($sProduct, 1) = "0" Then $sProduct = StringTrimLeft($sProduct, 1) Return $sProduct EndFunc ;==> _LongProduct
  15. Now I have a difficulty with some simple example from Gantmacher's treatise (vol.1). Let we have the rectangular matrix $matA | (4x3) | Global $A[3][4] = [[1,-1,2,0],[-1,2,-3,1],[0,1,-1,1]] $matA=_Eigen_CreateMatrixFromArray($A) How can I obtain the pseudo-inverse matrix for $matA? It's known that this pseudo-inverse unique matrix $matI | (4x3) | exists and has the following content: $matI => {{1/3,0.1/3},{1/9,1/9,2/9},{2/9,-1/9,1/9},{4/9,1/9,5/9}} Thank you.
×
×
  • Create New...