Results 1 to 13 of 13

Thread: Free send mail?

  1. #1
    Join Date
    Oct 2003
    Posts
    233

    Unanswered: Free send mail?

    I need to create a scheduled task that will open an excel file
    Qry Bloomberg and then email the results. The computer is in my office but not part of the network. Is there a way to send emails with out outlook ?

    If you can think of a better process I would also be interested. The bloomberg qry is for Fx Rates. Oh if you know of another way to get fx rates that would be even better

    Thanks

  2. #2
    Join Date
    Sep 2009
    Location
    Ontario
    Posts
    1,057
    Provided Answers: 1
    Install Microsoft Services for Unix, a free download from MS,
    Download details: Windows Services for UNIX Version 3.5

    Then use
    mail -s "Subject" to@domain.com <text_file
    where text_file is the output of your program.

  3. #3
    Join Date
    Oct 2003
    Posts
    233
    Microsoft Services for Unix for a computer running MS XP?

  4. #4
    Join Date
    Sep 2008
    Location
    London, UK
    Posts
    511
    I can help with the Bloomberg ---> Excel part... which FX rates do you need, and do you want to pull them in using formulas or VBA?

  5. #5
    Join Date
    Oct 2003
    Posts
    233
    CHF (CHF)
    AUD (USDAUD)
    GBP (USDGBP)

    i would like to pull formulas & vba if possible (just in case)

  6. #6
    Join Date
    Sep 2008
    Location
    London, UK
    Posts
    511
    For my peace of mind, please can you also confirm that distributing proprietry Bloomberg data like this doesn't breach any Bloomberg licencing agreements?

    Is that first rate USD/CHF?

  7. #7
    Join Date
    Oct 2003
    Posts
    233
    LOL the data is used in house for fx Gain loss accounting calc, yes the 1st is USD /CHF

  8. #8
    Join Date
    Sep 2008
    Location
    London, UK
    Posts
    511
    Which date(s)/time(s) do you want the rates from? COB yesterday?

  9. #9
    Join Date
    Oct 2003
    Posts
    233
    I would be running it every morning as of COB prior day. Are you in ny i think i owe u a beer for this effort LOL

  10. #10
    Join Date
    Sep 2008
    Location
    London, UK
    Posts
    511
    I'm in London, England, but I'd be happy to visit and buy you a beer if you cover my flights!

    I've got Bloomberg at work so I'll post a solution tomorrow when I'm back in the office. I think there may be complications with the formula-based solution if you are automating the process.

  11. #11
    Join Date
    Sep 2009
    Location
    Ontario
    Posts
    1,057
    Provided Answers: 1
    Quote Originally Posted by mikezx10 View Post
    Microsoft Services for Unix for a computer running MS XP?
    Yes, it installs like any other application, and gives you a KSH shell,and a CSH shell, along with the basic Unix utilities (sendmail, vi, grep) etc.

  12. #12
    Join Date
    Sep 2008
    Location
    London, UK
    Posts
    511
    Bloomberg -

    First a formula approach.

    In A1 put a date, say yesterday's date:
    Code:
    =TODAY()-1
    In C3 put the currency ticker:
    Code:
    USDCHF Curncy
    In C4 type in this field header (purely aesthetic):
    Code:
    Date
    In D4 we need the field name to look up:
    Code:
    PX_LAST
    Then in C5 the formula to retrieve the data:
    Code:
    =BDH($C$3,$D$4,$A$1,$A$1,"Dts=S","Quote=C","Days=A","DtFmt=D","cols=2;rows=1")
    • BDH is the Bloomberg Data History function.
    • PX_LAST is the last price on the date specified.
    • The DTS parameter defines whether or not to display the price's corresponding date ("S" is show). DtFmt formats the date output.
    • The Quote parameter defines whether to retrieve Average or Close price ("C" is close).
    • The Days parameter defines which days to observe. "A" is all calendar days.


    If A1 contains a non-business day then it will retrieve the closing price from the previous business day. eg. For 4th April 2010 the price returned would be the closing price on 2nd April 2010.

    Just repeat the set-up for each currency pair. The other tickers you need are:
    Code:
    AUDUSD Curncy
    GBPUSD Curncy
    I got all of this information using the import wizard in Excel under Bloomberg | Import Data. The Bloomberg Excel Tools add-in must be installed for the BDH() function to be recognised.

    VBA solution to follow...

  13. #13
    Join Date
    Sep 2008
    Location
    London, UK
    Posts
    511
    It looks like there are a few different (but seemingly similar) methods available in the Bloomberg API to retrieve the data. There are bound to be caveats that I'm not aware of, but this works for me:
    Code:
        'reference to the bloomberg data type library required 
     
    Sub foo()
     
        Const strFIELD As String = "PX_LAST"
     
        Dim objBBG As BLP_DATA_CTRLLib.BlpData
        Dim vResults, vCurrencies
     
     
        vCurrencies = Array("USDCHF Curncy", "AUDUSD Curncy", "GBPUSD Curncy")
        Set objBBG = New BLP_DATA_CTRLLib.BlpData
        objBBG.AutoRelease = False
     
        vResults = objBBG.BLPGetHistoricalData(security:=vCurrencies, _
                                            fields:=strFIELD, _
                                            StartDate:=VBA.Date - 1, _
                                            EndDate:=VBA.Date - 1)
     
        'what did we find?
        Stop 'have a look at vResults in the locals window
     
     
        Set objBBG = Nothing
     
    End Sub
    For reasons *unknown*, one of the other calls might be better.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •